def test_json_with_id(self, mock_jsonify, mock_get_db_connection): r = Resource(id='test') r.json() mock_jsonify.assert_called_once_with({'id': 'test'})
def test_json_with_resource(self, mock_jsonify, mock_get_db_connection): resource_data = {'data': 'test'} r = Resource(resource=resource_data) r.json() mock_jsonify.assert_called_once_with(resource_data)