def test_for_herd(self): herds, packages = setup_herds() herd = herds[0] self.assertEqual( list(Package.objects.for_herd(herd)), packages[:1] )
def setUp(self): super(HerdsTests, self).setUp() self.herds, self.packages = setup_herds()
def test_herds(self): herds, packages = setup_herds() herd_names = [h.herd for h in herds] for herd in Package.objects.herds(): self.assertTrue(herd["herds__herd"] in herd_names)
def test_for_herd(self): herds, packages = setup_herds() herd = herds[0] self.assertEqual(list(Package.objects.for_herd(herd)), packages[:1])