예제 #1
0
 def test_not_called_with_exclusions(self, _region_email_mock):
     self.app.addonexcludedregion.create(region=mkt.regions.UK.id)
     send_new_region_emails([mkt.regions.UK])
     eq_(list(_region_email_mock.call_args_list[0][0][0]), [])
예제 #2
0
 def test_not_called_with_enable_new_regions_false(self,
                                                   _region_email_mock):
     """Check enable_new_regions is False by default."""
     eq_(self.app.enable_new_regions, False)
     send_new_region_emails([mkt.regions.UK])
     eq_(list(_region_email_mock.call_args_list[0][0][0]), [])
예제 #3
0
 def test_not_called_with_future_exclusions(self, _region_email_mock):
     AddonExcludedRegion.objects.create(addon=self.app,
         region=mkt.regions.WORLDWIDE.id)
     send_new_region_emails([mkt.regions.CA])
     eq_(list(_region_email_mock.call_args_list[0][0][0]), [])
예제 #4
0
 def test_called(self, _region_email_mock):
     self.app.update(enable_new_regions=True)
     send_new_region_emails([mkt.regions.UK])
     eq_(list(_region_email_mock.call_args_list[0][0][0]), [self.app.id])
예제 #5
0
파일: test_cron.py 프로젝트: sunbiz/zamboni
 def test_not_called_with_enable_new_regions_false(self,
                                                   _region_email_mock):
     # Check enable_new_regions is False by default.
     eq_(self.app.enable_new_regions, False)
     send_new_region_emails([mkt.regions.UK])
     eq_(list(_region_email_mock.call_args_list[0][0][0]), [])
예제 #6
0
 def test_called(self, _region_email_mock):
     send_new_region_emails([mkt.regions.CA])
     eq_(list(_region_email_mock.call_args_list[0][0][0]),
         [self.app.id])
예제 #7
0
파일: test_cron.py 프로젝트: sunbiz/zamboni
 def test_called(self, _region_email_mock):
     self.app.update(enable_new_regions=True)
     send_new_region_emails([mkt.regions.UK])
     eq_(list(_region_email_mock.call_args_list[0][0][0]), [self.app.id])
예제 #8
0
파일: test_cron.py 프로젝트: sunbiz/zamboni
 def test_not_called_with_exclusions(self, _region_email_mock):
     AddonExcludedRegion.objects.create(addon=self.app,
                                        region=mkt.regions.UK.id)
     send_new_region_emails([mkt.regions.UK])
     eq_(list(_region_email_mock.call_args_list[0][0][0]), [])
예제 #9
0
 def test_not_called_with_exclusions(self, _region_email_mock):
     self.app.addonexcludedregion.create(region=mkt.regions.UK.id)
     send_new_region_emails([mkt.regions.UK])
     eq_(list(_region_email_mock.call_args_list[0][0][0]), [])
예제 #10
0
 def test_not_called_with_enable_new_regions_false(self,
                                                   _region_email_mock):
     """Check enable_new_regions is False by default."""
     self.app.update(enable_new_regions=False)
     send_new_region_emails([mkt.regions.GBR])
     eq_(list(_region_email_mock.call_args_list[0][0][0]), [])
예제 #11
0
 def test_called(self, _region_email_mock):
     eq_(self.app.enable_new_regions, True)
     send_new_region_emails([mkt.regions.GBR])
     eq_(list(_region_email_mock.call_args_list[0][0][0]), [self.app.id])
예제 #12
0
 def test_called(self, _region_email_mock):
     eq_(self.app.enable_new_regions, True)
     send_new_region_emails([mkt.regions.GBR])
     eq_(list(_region_email_mock.call_args_list[0][0][0]), [self.app.id])
예제 #13
0
 def test_called(self, _region_email_mock):
     send_new_region_emails([mkt.regions.CA])
     eq_(list(_region_email_mock.call_args_list[0][0][0]), [self.app.id])