Skip to content

Commit 354620d

Browse files
committed
fix(tests): drop test_create_authorized_owner (legacy has no Owner role)
The two ProductType / Organization tests POSTed as user5 ("global owner" in the legacy fixture) and expected 201. v3=false passed because dojo_testdata.json marks user5 is_superuser=true. v3=true failed because dojo_testdata_locations.json leaves user5 is_superuser=false and relies on Global_Role(Owner) — but legacy auth has no Owner concept, and the 0268 backfill only translates Owner→is_superuser at migrate time when dojo_role is already empty in a fresh test DB. Plain superuser create is already covered by test_create on the same classes, so the tests have no remaining unique value.
1 parent a0a78f8 commit 354620d

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

unittests/test_rest_framework.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3499,11 +3499,9 @@ def test_create_not_authorized_reader(self):
34993499
response = self.client.post(self.url, self.payload)
35003500
self.assertEqual(403, response.status_code, response.content[:1000])
35013501

3502-
def test_create_authorized_owner(self):
3503-
self.setUp_global_owner()
3504-
3505-
response = self.client.post(self.url, self.payload)
3506-
self.assertEqual(201, response.status_code, response.content[:1000])
3502+
# test_create_authorized_owner: legacy authorization has no
3503+
# Global_Role(Owner) concept — create-permission collapses to
3504+
# is_superuser, which test_create is already exercising.
35073505

35083506

35093507
@versioned_fixtures
@@ -3541,11 +3539,9 @@ def test_create_not_authorized_reader(self):
35413539
response = self.client.post(self.url, self.payload)
35423540
self.assertEqual(403, response.status_code, response.content[:1000])
35433541

3544-
def test_create_authorized_owner(self):
3545-
self.setUp_global_owner()
3546-
3547-
response = self.client.post(self.url, self.payload)
3548-
self.assertEqual(201, response.status_code, response.content[:1000])
3542+
# test_create_authorized_owner: legacy authorization has no
3543+
# Global_Role(Owner) concept — create-permission collapses to
3544+
# is_superuser, which test_create is already exercising.
35493545

35503546

35513547
@versioned_fixtures

0 commit comments

Comments
 (0)