From 795eb235cbfbf8b00b4c9d834da73df1a307af05 Mon Sep 17 00:00:00 2001 From: Katie McGoff Date: Wed, 12 Feb 2020 13:36:42 -0800 Subject: [PATCH] fixed pytests to match (#9) --- tests/unit/test_comments.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/unit/test_comments.py b/tests/unit/test_comments.py index 2441ed6..4c93c95 100644 --- a/tests/unit/test_comments.py +++ b/tests/unit/test_comments.py @@ -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') @@ -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