We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dad3f5f commit 1c1798cCopy full SHA for 1c1798c
readthedocs/rtd_tests/tests/test_domains.py
@@ -81,6 +81,20 @@ def test_https(self):
81
project=self.project)
82
self.assertFalse(form.is_valid())
83
84
+ def test_canonical_change(self):
85
+ """Make sure https is an admin-only attribute"""
86
+ form = DomainForm({'domain': 'example.com', 'canonical': True},
87
+ project=self.project)
88
+ self.assertTrue(form.is_valid())
89
+ domain = form.save()
90
+ self.assertTrue(domain.canonical, 'example.com')
91
+
92
+ form = DomainForm({'domain': 'example2.com', 'canonical': True},
93
94
95
96
+ self.assertTrue(domain.canonical, 'example2.com')
97
98
99
class TestAPI(TestCase):
100
0 commit comments