示例#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)
示例#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)
示例#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)
示例#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)
示例#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)
示例#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)
示例#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)
示例#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)