def test_annalistuser1_data(self):
     usr = AnnalistUser(self.testcoll, "user1", self.testsite)
     self.assertEqual(usr.get_id(), "user1")
     self.assertEqual(usr.get_type_id(), "_user")
     self.assertIn("/c/testcoll/_annalist_collection/users/user1/",
                   usr.get_url())
     self.assertEqual(TestBaseUri + "/c/testcoll/d/_user/user1/",
                      usr.get_view_url())
     usr.set_values(annalistuser_create_values(user_id="user1"))
     td = usr.get_values()
     self.assertEqual(set(td.keys()), set(annalistuser_value_keys()))
     v = annalistuser_values(user_id="user1")
     self.assertDictionaryMatch(td, v)
     return
Exemple #2
0
 def test_annalistuser2_data(self):
     usr = AnnalistUser(self.testcoll, "user2")
     self.assertEqual(usr.get_id(), "user2")
     self.assertEqual(usr.get_type_id(), layout.USER_TYPEID)
     self.assertIn("/c/testcoll/d/%(user_dir)s/user2/" % self.layout,
                   usr.get_url())
     self.assertEqual(
         TestBaseUri + "/c/testcoll/d/%(user_typeid)s/user2/" % self.layout,
         usr.get_view_url())
     usr.set_values(annalistuser_create_values(user_id="user2"))
     ugv = usr.get_values()
     self.assertEqual(set(ugv.keys()), set(annalistuser_value_keys()))
     uev = annalistuser_values(user_id="user2")
     self.assertDictionaryMatch(ugv, uev)
     return
 def test_annalistuser2_data(self):
     usr = AnnalistUser(self.testcoll, "user2")
     self.assertEqual(usr.get_id(), "user2")
     self.assertEqual(usr.get_type_id(), layout.USER_TYPEID)
     self.assertIn(
         "/c/testcoll/_annalist_collection/%(user_dir)s/user2/"%self.layout, 
         usr.get_url()
         )
     self.assertEqual(
         TestBaseUri + "/c/testcoll/d/%(user_typeid)s/user2/"%self.layout, 
         usr.get_view_url()
         )
     usr.set_values(annalistuser_create_values(user_id="user2"))
     ugv = usr.get_values()
     self.assertEqual(set(ugv.keys()), set(annalistuser_value_keys()))
     uev = annalistuser_values(user_id="user2")
     self.assertDictionaryMatch(ugv, uev)
     return