Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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)