Roland Haroutiounian 9 years ago
parent
commit
b69b21b431
2 changed files with 3 additions and 8 deletions
  1. 1
    1
      EditorialModel/fields.py
  2. 2
    7
      EditorialModel/test/test_field.py

+ 1
- 1
EditorialModel/fields.py View File

@@ -51,7 +51,7 @@ class EmField(EmComponent):
51 51
             exists = EmField(name)
52 52
         except EmComponentNotExistError:
53 53
             values = {
54
-                'uid' : None,
54
+                #'uid' : None,
55 55
                 'name' : name,
56 56
                 'fieldgroup_id' : em_fieldgroup.uid,
57 57
                 'fieldtype' : em_fieldtype.name,

+ 2
- 7
EditorialModel/test/test_field.py View File

@@ -53,14 +53,9 @@ class FieldTestCase(TestCase):
53 53
         self.testClass = EmClass.create("testclass1",EmClassType.entity)
54 54
         self.testClassUid = self.testClass.uid
55 55
 
56
-        self.testType = EmType.create('testtype1',self.testClass)
57
-        self.testTypeUid = self.testType.uid
58
-
59
-        self.testFieldType = EmFieldType('testfieldtype1')
60
-        self.testFieldTypeUid = self.testFieldType.uid
56
+        self.testFieldType = EmField_integer()
61 57
 
62 58
         self.testFieldgroup = EmFieldGroup.create('fieldgrp1',self.testClass)
63
-        self.testFieldgroupUid = self.testFieldgroup.uid
64 59
 
65 60
         pass
66 61
 
@@ -157,7 +152,7 @@ class TestField(FieldTestCase):
157 152
     # tests the creation process of a field
158 153
     def testCreate(self):
159 154
 
160
-        field = EmField.create('testfield1', self.testFieldgroup, self.testFieldtype)
155
+        field = EmField.create('testfield1', self.testFieldgroup, self.testFieldType)
161 156
         fieldUid = field.uid
162 157
         # We check that the field has been added in the em_field table
163 158
         field_records = self.get_field_records(fieldUid)

Loading…
Cancel
Save