def test_rate_limits(self):
        self.app.config['USE_RATE_LIMITS'] = True

        rv, json = self.client.get('/api/v1.0/registrations/')
        self.assertTrue(rv.status_code == 200)
        self.assertTrue(rv.headers in 'X-RateLimit-Remaining')
        self.assertTrue('X-RateLimit-Limit' in rv.headers)
        self.assertTrue('X-RateLimit-Reset' in rv.headers)
        self.assertTrue(int(rv.headers['X-RateLimit-Limit']) == int(rv.headers['X-RateLimit-Remaining']) + 1)
        while int(rv.headers['X-RateLimit-Remaining']) > 0:
            rv, json = self.client.get('/api/v1.0/registrations/')
        self.assertTrue(rv.status_code == 429)
dataset/ETHPy150Open miguelgrinberg/api-pycon2014/tests/test_api.py/TestAPI.test_rate_limits/swapped operands of `in`