          self.assertEqual(0, Group.objects.count())
  
          response = self.client.post('/groups/', {'name': 'foo'})
  
          self.assertEqual(response.status_code, 201)
          self.assertEqual(1, Group.objects.count())
          self.assertEqual('foo', Group.objects.all()[0].name)
  
      def test_creation_with_m2m_relation(self):
          """Ensure that a model object with a m2m relation can be created"""
          group = Group(name='foo')
          group.save()
 
</s> remove     def test_creation_with_m2m_relation(self):
        """Ensure that a model object with a m2m relation can be created"""
        group = Group(name='foo')
        group.save()
        self.assertEqual(0, User.objects.count())
 </s> add #     def test_creation_with_m2m_relation(self):
#         """Ensure that a model object with a m2m relation can be created"""
#         group = Group(name='foo')
#         group.save()
#         self.assertEqual(0, User.objects.count()) </s> remove         response = self.client.post('/groups/', {'name': 'foo'})
 </s> add #         response = self.client.post('/groups/', {'name': 'foo'}) </s> remove     def test_creation(self):
        """Ensure that a model object can be created"""
        self.assertEqual(0, Group.objects.count())
 </s> add #     def test_creation(self):
#         """Ensure that a model object can be created"""
#         self.assertEqual(0, Group.objects.count()) </s> remove     def test_creation_with_m2m_relation_through(self):
        """
        Ensure that a model object with a m2m relation can be created where that
        relation uses a through table
        """
        group = Group(name='foo')
        group.save()
        self.assertEqual(0, User.objects.count())
 </s> add #     def test_creation_with_m2m_relation_through(self):
#         """
#         Ensure that a model object with a m2m relation can be created where that
#         relation uses a through table
#         """
#         group = Group(name='foo')
#         group.save()
#         self.assertEqual(0, User.objects.count()) </s> remove         group = user.groups.all()[0]
        self.assertEqual('foo', group.name)
 </s> add #         group = user.groups.all()[0]
#         self.assertEqual('foo', group.name)
#         self.assertEqual(response.status_code, 201)
#         self.assertEqual(1, Group.objects.count())
#         self.assertEqual('foo', Group.objects.all()[0].name)
          self.assertEqual(0, Group.objects.count())
  
          response = self.client.post('/groups/', {'name': 'foo'})
  
#         self.assertEqual(response.status_code, 201)
#         self.assertEqual(1, Group.objects.count())
#         self.assertEqual('foo', Group.objects.all()[0].name)
#         self.assertEqual(response.status_code, 201)
#         self.assertEqual(1, Group.objects.count())
#         self.assertEqual('foo', Group.objects.all()[0].name)
#         self.assertEqual(response.status_code, 201)
#         self.assertEqual(1, Group.objects.count())
#         self.assertEqual('foo', Group.objects.all()[0].name)
  
      def test_creation_with_m2m_relation(self):
          """Ensure that a model object with a m2m relation can be created"""
          group = Group(name='foo')
          group.save()
keep keep keep keep replace replace replace keep keep keep keep keep
 Drop out resources & mixins 
djangorestframework/tests/modelviews.py