Exemple #1
0
 def test_recordenum_base_init(self):
     # Note that if base class is used directly, the type_id value isn't recognized
     # as it needs to be a class property.
     e = RecordEnumBase(self.testcoll, "testenum2",
                        layout.ENUM_LIST_TYPE_ID)
     self.assertEqual(e._entitytype, ANNAL.CURIE.Enum)
     self.assertEqual(e._entityfile, layout.ENUM_META_FILE)
     self.assertEqual(
         e._entityref, layout.COLL_BASE_ENUM_REF % {
             'type_id': layout.ENUM_LIST_TYPE_ID,
             'id': "testenum2"
         })
     self.assertEqual(e._entityid, "testenum2")
     self.assertEqual(
         e._entityurl,
         TestHostUri + recordenum_url(
             "testenum2",
             coll_id="testcoll",
             type_id="_enum_base_id"  # See note
         ))
     self.assertEqual(
         e._entitydir,
         recordenum_dir(
             "testenum2",
             coll_id="testcoll",
             type_id="_enum_base_id"  # See note
         ))
     self.assertEqual(e._values, None)
     resetSitedata(scope="collections")  #@@checkme@@
     return
 def test_recordenum_base_init(self):
     # Note that if base class is used directly, the type_id value isn't recognized 
     # as it needs to be a class property.
     e = RecordEnumBase(self.testcoll, "testenum2", "Enum_list_type")
     self.assertEqual(e._entitytype,     ANNAL.CURIE.Enum)
     self.assertEqual(e._entityfile,     layout.ENUM_META_FILE)
     self.assertEqual(e._entityref,      
         layout.COLL_BASE_ENUM_REF%{'type_id': "Enum_list_type", 'id': "testenum2"}
         )
     self.assertEqual(e._entityid,       "testenum2")
     self.assertEqual(e._entityurl,      
         TestHostUri + recordenum_url(
             "testenum2", coll_id="testcoll", type_id=layout.ENUM_TYPEID
             )
         )
     self.assertEqual(e._entitydir,      
         recordenum_dir(
             "testenum2", coll_id="testcoll", type_id=layout.ENUM_TYPEID
             )
         )
     self.assertEqual(e._values,         None)
     resetSitedata()
     return
 def tearDown(self):
     resetSitedata()
     return
Exemple #4
0
 def tearDownClass(cls):
     resetSitedata(scope="all")
     return
Exemple #5
0
 def tearDown(self):
     resetSitedata(scope="collections")
     return
 def tearDownClass(cls):
     resetSitedata()
     return
 def tearDownClass(cls):
     resetSitedata()
     return
Exemple #8
0
 def tearDownClass(cls):
     resetSitedata(scope="collections")
     return
 def tearDownClass(cls):
     resetSitedata(scope="collections") #@@checkme@@
     return
 def tearDown(self):
     resetSitedata(scope="collections")
     return
Exemple #11
0
 def setUpClass(cls):
     # Remove any collections left behind from previous tests
     resetSitedata(scope="collections")
     return
Exemple #12
0
 def tearDown(self):
     resetSitedata()
     return
Exemple #13
0
 def tearDown(self):
     resetSitedata(scope="all")
     return