          ]
          self.assertEqual(serializer.data, expected)
  
      def test_reverse_many_to_many_create(self):
          data = {'id': 4, 'name': 'target-4', 'sources': [1, 3]}
          serializer = ManyToManyTargetSerializer(data=data)
          self.assertTrue(serializer.is_valid())
          obj = serializer.save()
          self.assertEqual(serializer.data, data)
 
</s>
    def test_many_to_many_unsaved(self):
        source = ManyToManySource(name='source-unsaved')

        serializer = ManyToManySourceSerializer(source)

        expected = {'id': None, 'name': 'source-unsaved', 'targets': []}
        # no query if source hasn't been created yet
        with self.assertNumQueries(0):
            self.assertEqual(serializer.data, expected)

          ]
          self.assertEqual(serializer.data, expected)
  
    def test_many_to_many_unsaved(self):
        source = ManyToManySource(name='source-unsaved')

        serializer = ManyToManySourceSerializer(source)

        expected = {'id': None, 'name': 'source-unsaved', 'targets': []}
        # no query if source hasn't been created yet
        with self.assertNumQueries(0):
            self.assertEqual(serializer.data, expected)

      def test_reverse_many_to_many_create(self):
          data = {'id': 4, 'name': 'target-4', 'sources': [1, 3]}
          serializer = ManyToManyTargetSerializer(data=data)
          self.assertTrue(serializer.is_valid())
          obj = serializer.save()
          self.assertEqual(serializer.data, data)
keep keep add keep keep keep keep keep keep
 Add support for serializing models with m2m related fields

- In both ManyRelatedField, provide an empty return when trying to
  access a relation field if the instance in question has no PK (so
  likely hasn't been inserted yet)
- Add relevant tests
- Without these changes, exceptions would be raised when trying to
  serialize the uncreated models as it is impossible to query
  relations without a PK
- Add test to ensure RelatedField does not regress as currently 
  supports being serialized with and unsaved model
tests/test_relations_pk.py