Browse Source

ME test: changement de nom de fonction : new_uid

ArnAud 9 years ago
parent
commit
b7eb53c98a

+ 5
- 5
EditorialModel/test/test_component.py View File

249
         pass
249
         pass
250
 
250
 
251
 #=======================#
251
 #=======================#
252
-#   EmComponent.newUid  #
252
+#   EmComponent.new_uid  #
253
 #=======================#
253
 #=======================#
254
 class TestUid(ComponentTestCase):
254
 class TestUid(ComponentTestCase):
255
 
255
 
256
     
256
     
257
     def test_newuid(self):
257
     def test_newuid(self):
258
-        """ Test valid calls for newUid method """
258
+        """ Test valid calls for new_uid method """
259
         for _ in range(10):
259
         for _ in range(10):
260
-            nuid = EmTestComp.newUid()
260
+            nuid = EmTestComp.new_uid()
261
         
261
         
262
             conn = self.dber.connect()
262
             conn = self.dber.connect()
263
             tuid = sqla.Table('uids', sqlutils.meta(self.dber))
263
             tuid = sqla.Table('uids', sqlutils.meta(self.dber))
272
         pass
272
         pass
273
     
273
     
274
     def test_newuid_abstract(self):
274
     def test_newuid_abstract(self):
275
-        """ Test not valit call for newUid method """
275
+        """ Test not valit call for new_uid method """
276
         with self.assertRaises(NotImplementedError):
276
         with self.assertRaises(NotImplementedError):
277
-            EmComponent.newUid()
277
+            EmComponent.new_uid()
278
         pass
278
         pass
279
         
279
         
280
 #=======================#
280
 #=======================#

+ 3
- 3
EditorialModel/test/test_fieldgroups.py View File

89
         self.creadate = datetime.datetime.utcnow()
89
         self.creadate = datetime.datetime.utcnow()
90
         #Test fieldgroup
90
         #Test fieldgroup
91
         self.tfg = [
91
         self.tfg = [
92
-            { 'uid': EmFieldGroup.newUid(), 'name': 'fg1', 'string': '{"fr":"Super Fieldgroup"}', 'help': '{"en":"help"}', 'rank': 0 , 'class_id': ent1.uid, 'date_create' : self.creadate, 'date_update': self.creadate},
93
-            { 'uid': EmFieldGroup.newUid(), 'name': 'fg2', 'string': '{"fr":"Super Fieldgroup"}', 'help': '{"en":"help"}', 'rank': 1 , 'class_id': ent1.uid, 'date_create': self.creadate, 'date_update': self.creadate},
94
-            { 'uid': EmFieldGroup.newUid(), 'name': 'fg3', 'string': '{"fr":"Super Fieldgroup"}', 'help': '{"en":"help"}', 'rank': 2 , 'class_id': idx1.uid, 'date_create': self.creadate, 'date_update': self.creadate},
92
+            { 'uid': EmFieldGroup.new_uid(), 'name': 'fg1', 'string': '{"fr":"Super Fieldgroup"}', 'help': '{"en":"help"}', 'rank': 0 , 'class_id': ent1.uid, 'date_create' : self.creadate, 'date_update': self.creadate},
93
+            { 'uid': EmFieldGroup.new_uid(), 'name': 'fg2', 'string': '{"fr":"Super Fieldgroup"}', 'help': '{"en":"help"}', 'rank': 1 , 'class_id': ent1.uid, 'date_create': self.creadate, 'date_update': self.creadate},
94
+            { 'uid': EmFieldGroup.new_uid(), 'name': 'fg3', 'string': '{"fr":"Super Fieldgroup"}', 'help': '{"en":"help"}', 'rank': 2 , 'class_id': idx1.uid, 'date_create': self.creadate, 'date_update': self.creadate},
95
         ]
95
         ]
96
 
96
 
97
         req = sqla.Table('em_fieldgroup', sqlutils.meta(sqlutils.getEngine())).insert(self.tfg)
97
         req = sqla.Table('em_fieldgroup', sqlutils.meta(sqlutils.getEngine())).insert(self.tfg)

Loading…
Cancel
Save