  
  
  # ForeignKey
  class ForeignKeyTarget(RESTFrameworkModel):
      name = models.CharField(max_length=100)
  
      def get_first_source(self):
          """Used for testing related field against a callable."""
 
</s> remove from .views import MockView
 </s> add from .views import BasicModelWithUsersViewSet, MockView
class BasicModelWithUsers(RESTFrameworkModel):
    users = models.ManyToManyField(User)


  
  
class BasicModelWithUsers(RESTFrameworkModel):
    users = models.ManyToManyField(User)


  # ForeignKey
  class ForeignKeyTarget(RESTFrameworkModel):
      name = models.CharField(max_length=100)
  
      def get_first_source(self):
          """Used for testing related field against a callable."""
keep add keep keep keep keep keep keep
 tests for #5127 (#7715)

* tests for #5127

* Resolves #5127 
tests/models.py