def setUp(self): self.fixture = create_fixture() home = Location.objects.create() hunting_ground = Location.objects.create() self.cat = Cat.objects.create( name='foo', home=home, backup_home=hunting_ground ) self.cat.hunting_grounds.add(hunting_ground)
def setUp(self): self.fixture = create_fixture() f = self.fixture f.users[0].favorite_pet = f.cats[0] f.users[0].save() f.users[1].favorite_pet = f.cats[1] f.users[1].save() f.users[2].favorite_pet = f.dogs[1] f.users[2].save()
def setUp(self): self.fixture = create_fixture() home_id = self.fixture.locations[0].id backup_home_id = self.fixture.locations[1].id parent = Cat.objects.create( name='Parent', home_id=home_id, backup_home_id=backup_home_id ) self.kitten = Cat.objects.create( name='Kitten', home_id=home_id, backup_home_id=backup_home_id, parent=parent )
def setUp(self): self.fixture = create_fixture() self.maxDiff = None self.default_user = User.objects.filter( manager__isnull=True, officer__isnull=True ).first() self.manager_user = User.objects.filter( manager__isnull=False ).first() self.officer_user = User.objects.filter( officer__isnull=False ).first() self.admin_user = User.objects.filter( is_superuser=True ).first()
def setUp(self): self.fixture = create_fixture() self.maxDiff = None
def setUp(self): self.fixture = create_fixture()
def setUp(self): self.fixture = create_fixture() self.view = GroupNoMergeDictViewSet.as_view({'post': 'create'}) self.rf = RequestFactory()
def setUp(self): self.fixture = create_fixture() self.rf = RequestFactory() self.view = DogViewSet.as_view({'patch': 'partial_update'})
def setUp(self): self.fixture = create_fixture() self.drest = DRESTClient('test', client=MockSession(self.client))
def handle(self, *args, **options): create_fixture() self.stdout.write("Loaded fixtures.")
def setUp(self): self.fixture = create_fixture() self.ids = [i.pk for i in self.fixture.dogs] self.ids_to_delete = self.ids[:2]