def test_create_property(self, requests): requests.post = Mock(return_value=self.get_mock_response({})) table = resources.Table(name='users') prop = resources.Property(1, 'age', False, 'string') client = SkyClient() client.create_property(table, prop) requests.post.assert_called_once_with( 'http://127.0.0.1:8585/tables/users/properties', headers={'content-type': 'application/json'}, data='{"data_type": "string", "id": 1, "name": "age", "transient": false}' # NOQA )