          view = views.BlogPosts.as_view()
          response = view(request)
          self.assertEqual(response.status_code, 200)
  
      def test_blogposts_not_exceed_10(self):
          '''Posting blogposts should not result in more than 10 items stored.'''
          models.BlogPost.objects.all().delete()
          for post in range(15):
              form_data = {'title': 'This is post #%s' % post, 'content': 'This is the content of post #%s' % post}
              request = self.factory.post('/blog-post', data=form_data)
              view = views.BlogPosts.as_view()
              response = view(request)
          self.assertEquals(len(models.BlogPost.objects.all()),10)
 
</s> remove             response = view(request)
        self.assertEquals(len(models.BlogPost.objects.all()),10)
 </s> add             view(request)
        self.assertEquals(len(models.BlogPost.objects.all()),views.MAX_POSTS)
        
    def test_fifo_behaviour(self):
        '''It's fine that the Blogposts are capped off at MAX_POSTS. But we want to make sure we see FIFO behaviour.'''
        for post in range(15):
            form_data = {'title': '%s' % post, 'content': 'This is the content of post #%s' % post}
            request = self.factory.post('/blog-post', data=form_data)
            view = views.BlogPosts.as_view()
            view(request)
        request = self.factory.get('/blog-post')    
        view = views.BlogPosts.as_view()
        response = view(request)
        response_posts = json.loads(response.content)
        response_titles = [d['title'] for d in response_posts]
        self.assertEquals(response_titles, ['%s' % i for i in range(views.MAX_POSTS - 5, views.MAX_POSTS + 5)]) </s> remove         
 </s> add         models.BlogPost.objects.all().delete()
 </s> remove 
 </s> add MAX_POSTS = 10 </s> remove from djangorestframework import status
 </s> add  </s> remove     """For the example the maximum amount of Blogposts is capped off at 10. 
 </s> add     """For the example the maximum amount of Blogposts is capped off at views.MAX_POSTS. 
    def test_blogposts_not_exceed_MAX_POSTS(self):
        '''Posting blog-posts should not result in more than MAX_POSTS items stored.'''
        for post in range(views.MAX_POSTS + 5):
          view = views.BlogPosts.as_view()
          response = view(request)
          self.assertEqual(response.status_code, 200)
  
    def test_blogposts_not_exceed_MAX_POSTS(self):
        '''Posting blog-posts should not result in more than MAX_POSTS items stored.'''
        for post in range(views.MAX_POSTS + 5):
    def test_blogposts_not_exceed_MAX_POSTS(self):
        '''Posting blog-posts should not result in more than MAX_POSTS items stored.'''
        for post in range(views.MAX_POSTS + 5):
    def test_blogposts_not_exceed_MAX_POSTS(self):
        '''Posting blog-posts should not result in more than MAX_POSTS items stored.'''
        for post in range(views.MAX_POSTS + 5):
    def test_blogposts_not_exceed_MAX_POSTS(self):
        '''Posting blog-posts should not result in more than MAX_POSTS items stored.'''
        for post in range(views.MAX_POSTS + 5):
              form_data = {'title': 'This is post #%s' % post, 'content': 'This is the content of post #%s' % post}
              request = self.factory.post('/blog-post', data=form_data)
              view = views.BlogPosts.as_view()
              response = view(request)
          self.assertEquals(len(models.BlogPost.objects.all()),10)
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Refactoring and added another test for blog-posts. Finally got eclipse setup properly with virtualenvs (code analysis). Also I think  I get Bitbuckets workflow now. 
examples/blogpost/tests.py