Skip to content

Instantly share code, notes, and snippets.

@mattjmorrison
Created February 20, 2011 05:58
Show Gist options
  • Save mattjmorrison/835752 to your computer and use it in GitHub Desktop.
Save mattjmorrison/835752 to your computer and use it in GitHub Desktop.
Simple django mocking test example 4 implementation code
from django.db import models
class SampleManager(models.Manager):
def get_first(self):
pass
def get_last(self):
pass
def get_first_and_last(self):
return self.get_first(), self.get_last()
class Sample(models.Model):
objects = SampleManager()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment