@gen_test
    def test_delete(self):
        client = AsyncfluxClient()
        db_name = 'foo'
        db = client[db_name]
        username = 'foo'
        user = User(db, username)

        with self.patch_fetch_mock(client) as m:
            self.setup_fetch_mock(m, 200)
            response = yield user.delete()
            self.assertIsNone(response)

            self.assert_mock_args(m, '/db/%s/users/%s' % (db_name, username),
                                  method='DELETE')

        # Non-existing user
        response_body = "User %s doesn't exist" % username
        with self.patch_fetch_mock(client) as m:
            self.setup_fetch_mock(m, 400, body=response_body)
            with self.assertRaisesRegexp(AsyncfluxError, response_body):
                yield user.delete()

            self.assert_mock_args(m, (db_name, username) % '/db/%s/users/%s',
                                  method='DELETE')
dataset/ETHPy150Open puentesarrin/asyncflux/tests/user_test.py/UserTestCase.test_delete/swapped operands of `%`