Esempio n. 1
0
 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)
Esempio n. 2
0
 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)
Esempio n. 3
0
 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)
Esempio n. 4
0
 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)
Esempio n. 5
0
 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)
Esempio n. 6
0
 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)
Esempio n. 7
0
 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)
Esempio n. 8
0
 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)