예제 #1
0
    def test_delete_table(self, requests):
        requests.delete = Mock(
            return_value=self.get_mock_response({})
        )

        table = resources.Table(name='users')

        client = SkyClient()
        client.delete_table(table)
        requests.delete.assert_called_once_with(
            'http://127.0.0.1:8585/tables/users',
            headers={'content-type': 'application/json'},
            data=None
        )