def test_returns_false_when_orgs_dont_overlap(self): a = FormSubmission.objects.filter( organizations__slug='a_pubdef').first() b = FormSubmission.objects.filter( organizations__slug='cc_pubdef').first() cc_pubdef = Organization.objects.get(slug='cc_pubdef') a.organizations.add_orgs_to_sub(cc_pubdef) self.assertEqual(SubmissionsService.have_same_orgs(a, b), False)
def test_returns_false_when_orgs_dont_overlap(self): a = FormSubmission.objects.filter( organizations__slug='a_pubdef').first() b = FormSubmission.objects.filter( organizations__slug='cc_pubdef').first() cc_pubdef = Organization.objects.get(slug='cc_pubdef') a.organizations.add_orgs_to_sub(cc_pubdef) self.assertEqual(SubmissionsService.have_same_orgs(a, b), False)
def test_returns_false_when_orgs_are_different(self): a = FormSubmission.objects.filter( organizations__slug='a_pubdef').first() b = FormSubmission.objects.filter( organizations__slug='cc_pubdef').first() self.assertEqual(SubmissionsService.have_same_orgs(a, b), False)
def test_returns_true_when_orgs_are_the_same(self): subs = FormSubmission.objects.filter( organizations__slug='a_pubdef') a, b = list(subs)[:2] self.assertEqual(SubmissionsService.have_same_orgs(a, b), True)
def test_returns_false_when_orgs_are_different(self): a = FormSubmission.objects.filter( organizations__slug='a_pubdef').first() b = FormSubmission.objects.filter( organizations__slug='cc_pubdef').first() self.assertEqual(SubmissionsService.have_same_orgs(a, b), False)
def test_returns_true_when_orgs_are_the_same(self): subs = FormSubmission.objects.filter( organizations__slug='a_pubdef') a, b = list(subs)[:2] self.assertEqual(SubmissionsService.have_same_orgs(a, b), True)
def test_returns_false_when_orgs_are_different(self): a = FormSubmission.objects.filter( organizations__slug=Organizations.ALAMEDA_PUBDEF).first() b = FormSubmission.objects.filter( organizations__slug=Organizations.COCO_PUBDEF).first() self.assertEqual(SubmissionsService.have_same_orgs(a, b), False)
def test_returns_false_when_orgs_are_different(self): a = FormSubmission.objects.filter( organizations__slug=Organizations.ALAMEDA_PUBDEF).first() b = FormSubmission.objects.filter( organizations__slug=Organizations.COCO_PUBDEF).first() self.assertEqual(SubmissionsService.have_same_orgs(a, b), False)