Skip to content

Commit

Permalink
fixed pytests to match (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
katiemcgoff authored Feb 12, 2020
1 parent 5e49dc1 commit 795eb23
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/unit/test_comments.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,8 @@ def test_invalid_no_filing_or_business_id():
assert not is_valid


def test_invalid_no_submitter():
"""Assert that submitter id is required."""
# check with submitterId set to null
def test_invalid_null_submitter():
"""Assert that submitter id cannot be null."""
comment = copy.deepcopy(COMMENT_FILING)
comment['comment']['submitterId'] = None
is_valid, errors = validate(comment, 'comment')
Expand All @@ -114,11 +113,14 @@ def test_invalid_no_submitter():
print(errors)
assert not is_valid

# check with submitterId removed entirely

def test_valid_no_submitter():
"""Assert that submitter id is not required."""
comment = copy.deepcopy(COMMENT_FILING)
del comment['comment']['submitterId']
is_valid, errors = validate(comment, 'comment')
if errors:
for err in errors:
print(err.message)
print(errors)
assert not is_valid
assert is_valid

0 comments on commit 795eb23

Please sign in to comment.