Browse Source

ME test: changement de nom de fonction : new_uid

ArnAud 9 years ago
parent
commit
b7eb53c98a
2 changed files with 8 additions and 8 deletions
  1. 5
    5
      EditorialModel/test/test_component.py
  2. 3
    3
      EditorialModel/test/test_fieldgroups.py

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

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

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

@@ -89,9 +89,9 @@ class TestInit(FieldGroupTestCase):
89 89
         self.creadate = datetime.datetime.utcnow()
90 90
         #Test fieldgroup
91 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 97
         req = sqla.Table('em_fieldgroup', sqlutils.meta(sqlutils.getEngine())).insert(self.tfg)

Loading…
Cancel
Save