'Ensure request rate is limited for a limited duration only'

def test_request_throttling_expires(self):

    self.set_throttle_timer(MockView, 0)
    request = self.factory.get(u'/')
    for dummy in range(4):
        response = MockView.as_view()(request)
    assert (response.status_code == 429)
    self.set_throttle_timer(MockView, 1)
    response = MockView.as_view()(request)
    assert (response.status_code == 200)
