Ejemplo n.º 1
0
    def test_no_migration_of_free_apps_without_world_aer_paid_app(self):
        """Paid app users already have the ability to set enable_new_regions
        so we don't want to clobber that.

        """
        self.webapp.update(premium_type=amo.ADDON_PREMIUM)
        eq_(self.webapp.enable_new_regions, False)
        eq_(self.webapp.addonexcludedregion.filter(
            region=WORLDWIDE.id).count(), 0)
        migrate_free_apps_without_worldwide_aer.Command().handle()
        eq_(Webapp.objects.no_cache().get(pk=337141).enable_new_regions, False)
Ejemplo n.º 2
0
 def test_no_migration_of_free_apps_with_world_aer_already_enabled(self):
     self.webapp.update(enable_new_regions=True)
     AER.objects.create(addon=self.webapp, region=WORLDWIDE.id)
     migrate_free_apps_without_worldwide_aer.Command().handle()
     eq_(Webapp.objects.no_cache().get(pk=337141).enable_new_regions, True)
Ejemplo n.º 3
0
 def test_migration_of_free_apps_without_world_aer(self):
     eq_(self.webapp.enable_new_regions, False)
     eq_(self.webapp.addonexcludedregion.filter(
         region=WORLDWIDE.id).count(), 0)
     migrate_free_apps_without_worldwide_aer.Command().handle()
     eq_(Webapp.objects.no_cache().get(pk=337141).enable_new_regions, True)
Ejemplo n.º 4
0
 def test_no_migration_of_free_apps_with_world_aer(self):
     eq_(self.webapp.enable_new_regions, False)
     self.webapp.addonexcludedregion.create(region=mkt.regions.WORLDWIDE.id)
     migrate_free_apps_without_worldwide_aer.Command().handle()
     eq_(Webapp.objects.no_cache().get(pk=337141).enable_new_regions, False)