def test_user_json__success(self): parsed_user, errors = UserSchema.jsonapi(self.user2) expected_result = EXPECTED_USERS['user_json__success'] assert type(parsed_user) is str assert_valid_response(parsed_user, expected_result) assert errors == {}
def test_user_include_orders__success(self): parsed_user, _ = UserSchema.jsonapi( self.user1, include_data=['orders']) expected_result = EXPECTED_USERS['user_include_orders__success'] assert_valid_response(parsed_user, expected_result)