fix dashboard source result routes
All checks were successful
CI/CD Pipeline / Manual Action Help (push) Has been skipped
CI/CD Pipeline / Start Dev Containers in Dokploy (push) Has been skipped
CI/CD Pipeline / Drop and Recreate Dev Database (push) Has been skipped
CI/CD Pipeline / Quality Gate (push) Successful in 53s
CI/CD Pipeline / Build and Push Images (push) Successful in 3m28s
CI/CD Pipeline / Internal Notify (push) Successful in 1s
CI/CD Pipeline / Deploy Dev in Dokploy (push) Successful in 1s
All checks were successful
CI/CD Pipeline / Manual Action Help (push) Has been skipped
CI/CD Pipeline / Start Dev Containers in Dokploy (push) Has been skipped
CI/CD Pipeline / Drop and Recreate Dev Database (push) Has been skipped
CI/CD Pipeline / Quality Gate (push) Successful in 53s
CI/CD Pipeline / Build and Push Images (push) Successful in 3m28s
CI/CD Pipeline / Internal Notify (push) Successful in 1s
CI/CD Pipeline / Deploy Dev in Dokploy (push) Successful in 1s
This commit is contained in:
@@ -179,12 +179,14 @@ class CurrentUserViewTest(APITestCase):
|
||||
"is_active",
|
||||
"role",
|
||||
"role_label",
|
||||
"capabilities",
|
||||
"profile",
|
||||
},
|
||||
)
|
||||
self.assertEqual(response.data["id"], self.user.id)
|
||||
self.assertEqual(response.data["email"], self.user.email)
|
||||
self.assertEqual(response.data["role"], "user")
|
||||
self.assertFalse(response.data["capabilities"]["can_manage_exchange"])
|
||||
self.assertEqual(
|
||||
set(response.data["profile"].keys()),
|
||||
{"first_name", "middle_name", "last_name", "full_name"},
|
||||
@@ -267,6 +269,7 @@ class AdminUserManagementViewTest(APITestCase):
|
||||
"is_active",
|
||||
"role",
|
||||
"role_label",
|
||||
"capabilities",
|
||||
"profile",
|
||||
},
|
||||
)
|
||||
@@ -274,9 +277,16 @@ class AdminUserManagementViewTest(APITestCase):
|
||||
set(response.data["results"][0]["profile"].keys()),
|
||||
{"first_name", "middle_name", "last_name", "full_name"},
|
||||
)
|
||||
usernames = {item["username"] for item in response.data["results"]}
|
||||
users_by_name = {item["username"]: item for item in response.data["results"]}
|
||||
usernames = set(users_by_name)
|
||||
self.assertIn(self.admin.username, usernames)
|
||||
self.assertIn(self.user.username, usernames)
|
||||
self.assertTrue(
|
||||
users_by_name[self.admin.username]["capabilities"]["can_manage_exchange"]
|
||||
)
|
||||
self.assertFalse(
|
||||
users_by_name[self.user.username]["capabilities"]["can_manage_exchange"]
|
||||
)
|
||||
|
||||
def test_admin_can_search_users(self):
|
||||
ProfileFactory.create_profile(
|
||||
|
||||
Reference in New Issue
Block a user