Esempio n. 1
0
 def test_admin_user_configuration(self):
     config = self._get_configuration(admin=True)
     assert_has_keys(config, *TEST_KEYS_FOR_ALL_USERS)
     assert_has_keys(config, *TEST_KEYS_FOR_ADMIN_ONLY)
Esempio n. 2
0
 def check_role_dict(role_dict, assert_id=None):
     assert_has_keys(role_dict, "id", "name", "model_class", "url")
     assert role_dict["model_class"] == "Role"
     if assert_id is not None:
         assert role_dict["id"] == assert_id
Esempio n. 3
0
 def test_normal_user_configuration(self):
     config = self._get_configuration()
     assert_has_keys(config, *TEST_KEYS_FOR_ALL_USERS)
     assert_not_has_keys(config, *TEST_KEYS_FOR_ADMIN_ONLY)
Esempio n. 4
0
 def _assert_has_keys(self, response, *keys):
     assert_has_keys(response, *keys)