def test_nulls_are_removed_from_brief_response_data(self): brief_response = BriefResponse(data={}) brief_response.data = {'foo': 'bar', 'bar': None} assert brief_response.data == {'foo': 'bar'}
def test_whitespace_is_stripped_from_brief_response_data(self): brief_response = BriefResponse(data={}) brief_response.data = {'foo': ' bar ', 'bar': ['', ' foo']} assert brief_response.data == {'foo': 'bar', 'bar': ['foo']}
def test_foreign_fields_are_removed_from_brief_response_data(self): brief_response = BriefResponse(data={}) brief_response.data = {'foo': 'bar', 'briefId': 5, 'supplierId': 100} assert brief_response.data == {'foo': 'bar'}