Example #1
0
    def test_same_name_not_allowed_on_same_site(self):
        self.data['sites'] = [
            self.other_site.pk,
            Site.objects.get_current().pk
        ]
        form = FormatForm(self.data)

        tools.assert_false(form.is_valid())
Example #2
0
    def test_same_name_not_allowed_on_same_site(self):
        self.data['sites'] = [self.other_site.pk, Site.objects.get_current().pk]
        form = FormatForm(self.data)

        tools.assert_false(form.is_valid())
Example #3
0
    def test_same_name_formats_allowed_if_in_different_sites(self):
        self.data['sites'] = [self.other_site.pk]
        form = FormatForm(self.data)

        tools.assert_true(form.is_valid())
Example #4
0
    def test_same_name_formats_allowed_if_in_different_sites(self):
        self.data['sites'] = [self.other_site.pk]
        form = FormatForm(self.data)

        tools.assert_true(form.is_valid())