'Verify that rate limiting kicks in after 4 threads or replies.'

def test_post_ratelimit(self):

    d = DocumentFactory()
    u = UserFactory()
    self.client.login(username=u.username, password='testpass')
    for i in range(2):
        response = post(self.client, 'wiki.discuss.new_thread', {'title': 'Topic', 'content': 'hellooo'}, args=[d.slug])
        eq_(200, response.status_code)
    t = Thread.objects.all()[0]
    for i in range(3):
        response = post(self.client, 'wiki.discuss.reply', {'content': 'hellooo'}, args=[d.slug, t.id])
        eq_(200, response.status_code)
    response = post(self.client, 'wiki.discuss.new_thread', {'title': 'Topic', 'content': 'hellooo'}, args=[d.slug])
    eq_(4, Post.objects.count())
