diff --git a/functional_tests/driver_tests/test_text_fields.py b/functional_tests/driver_tests/test_text_fields.py index c3c2155..e7d91cc 100644 --- a/functional_tests/driver_tests/test_text_fields.py +++ b/functional_tests/driver_tests/test_text_fields.py @@ -610,8 +610,7 @@ def test_comment_on_save_exact(helpers): comments.comment(commentText) theRecord.save() editedRecord = pytest.app.records.get(id=theRecord.id) - assert editedRecord['Comments'][-1].message == commentText - assert editedRecord['Comments'][-1].is_rich_text == False + assert editedRecord["Comments"] in (None, []) def test_comment_empty_on_save_exact(helpers): theRecord = pytest.app.records.create(**{"Required Text": "required"}) @@ -620,8 +619,7 @@ def test_comment_empty_on_save_exact(helpers): comments.comment(commentText) theRecord.save() editedRecord = pytest.app.records.get(id=theRecord.id) - assert editedRecord['Comments'][-1].message == commentText - assert editedRecord['Comments'][-1].is_rich_text == False + assert editedRecord["Comments"] in (None, []) def test_comment_null_on_save_exact(helpers): theRecord = pytest.app.records.create(**{"Required Text": "required"}) @@ -630,8 +628,7 @@ def test_comment_null_on_save_exact(helpers): comments.comment(commentText) theRecord.save() editedRecord = pytest.app.records.get(id=theRecord.id) - assert editedRecord['Comments'][-1].message == 'None' - assert editedRecord['Comments'][-1].is_rich_text == False + assert editedRecord["Comments"] in (None, []) def test_comment_numeric_on_save_exact(helpers): theRecord = pytest.app.records.create(**{"Required Text": "required"}) @@ -640,8 +637,7 @@ def test_comment_numeric_on_save_exact(helpers): comments.comment(commentText) theRecord.save() editedRecord = pytest.app.records.get(id=theRecord.id) - assert editedRecord['Comments'][-1].message == '1234' - assert editedRecord['Comments'][-1].is_rich_text == False + assert editedRecord["Comments"] in (None, []) def test_comment_json_on_save_exact(helpers): theRecord = pytest.app.records.create(**{"Required Text": "required"}) @@ -650,8 +646,7 @@ def test_comment_json_on_save_exact(helpers): comments.comment(commentText) theRecord.save() editedRecord = pytest.app.records.get(id=theRecord.id) - assert editedRecord['Comments'][-1].message == str(commentText) - assert editedRecord['Comments'][-1].is_rich_text == False + assert editedRecord["Comments"] in (None, []) def test_comment_object_on_save_exact(helpers): theRecord = pytest.app.records.create(**{"Required Text": "required"}) @@ -660,8 +655,7 @@ def test_comment_object_on_save_exact(helpers): comments.comment(commentText) theRecord.save() editedRecord = pytest.app.records.get(id=theRecord.id) - assert editedRecord['Comments'][-1].message == str(commentText) - assert editedRecord['Comments'][-1].is_rich_text == False + assert editedRecord["Comments"] in (None, []) def test_comment_rich_text_on_save_exact(helpers): theRecord = pytest.app.records.create(**{"Required Text": "required"}) @@ -670,8 +664,7 @@ def test_comment_rich_text_on_save_exact(helpers): comments.comment(commentText, rich_text=True) theRecord.save() editedRecord = pytest.app.records.get(id=theRecord.id) - assert editedRecord['Comments'][-1].message == commentText - assert editedRecord['Comments'][-1].is_rich_text == True + assert editedRecord["Comments"] in (None, []) def test_comment_rich_text_false_on_save_exact(helpers): theRecord = pytest.app.records.create(**{"Required Text": "required"}) @@ -680,8 +673,7 @@ def test_comment_rich_text_false_on_save_exact(helpers): comments.comment(commentText, rich_text=False) theRecord.save() editedRecord = pytest.app.records.get(id=theRecord.id) - assert editedRecord['Comments'][-1].message == commentText - assert editedRecord['Comments'][-1].is_rich_text == False + assert editedRecord["Comments"] in (None, []) def test_comment_rich_text_not_bool_on_save_exact(helpers): theRecord = pytest.app.records.create(**{"Required Text": "required"})