Browse Source

Tests checked

prieto 9 years ago
parent
commit
0a870e55f6
1 changed files with 10 additions and 16 deletions
  1. 10
    16
      tests/editorial_model/test_translator_xmlfile.py

+ 10
- 16
tests/editorial_model/test_translator_xmlfile.py View File

@@ -47,7 +47,6 @@ class XmlFileTestCase(unittest.TestCase):
47 47
         
48 48
         f_tmp, file_name = tempfile.mkstemp()
49 49
         os.close(f_tmp)
50
-        
51 50
         emmodel.save(xmlfile, filename=file_name)
52 51
         new_model = EditorialModel.load(xmlfile, filename=file_name)
53 52
         
@@ -108,12 +107,9 @@ class XmlFileTestCase(unittest.TestCase):
108 107
         grp1.add_components([cls1,cls2])
109 108
         grp2.add_components([cls1f1,cls2f1, cls2f2])
110 109
         emmodel.save(xmlfile, filename=self.tmpfile)
111
-        
112 110
         emmodel_loaded = xmlfile.load(self.tmpfile)
113 111
         self.assertEqual(   emmodel.d_hash(),
114 112
                             emmodel_loaded.d_hash())
115
-
116
-    @unittest.skip("Waiting for bugfix")
117 113
     def test_groups_dependencies(self):
118 114
         """ Testing xmlfile groups population dependencies """
119 115
         emmodel = EditorialModel("em_test", description = "test model")
@@ -121,16 +117,14 @@ class XmlFileTestCase(unittest.TestCase):
121 117
                                     display_name = "Test group")
122 118
         grp2 = emmodel.new_group(  'test_grp2',
123 119
                                    display_name = "Test group2")
124
-        grp3 = emmodel.new_group(  'test_grp2',
125
-                                   display_name = "Test group2",
120
+        grp3 = emmodel.new_group(  'test_grp3',
121
+                                   display_name = "Test group3",
126 122
                                    depends = [grp1, grp2])
127
-        emmodel.save(xmlfile, filename=self.tmpfile)
128 123
         
124
+        emmodel.save(xmlfile, filename=self.tmpfile)
129 125
         emmodel_loaded = xmlfile.load(self.tmpfile)
130 126
         self.assertEqual(   emmodel.d_hash(),
131 127
                             emmodel_loaded.d_hash())
132
-
133
-    @unittest.skip("Waiting for bugfix")
134 128
     def test_emfield_with_prop_bool(self):
135 129
         """ Testing xmlfile with bool as property for datahandler """
136 130
         emmodel = EditorialModel("em_test", description = "test model")
@@ -138,15 +132,14 @@ class XmlFileTestCase(unittest.TestCase):
138 132
                                     display_name = "test class 1")
139 133
         cls1f1 = cls1.new_field(    'testfield1',
140 134
                                     data_handler = 'varchar',
141
-                                    nullalble = True)
135
+                                    nullable = True)
142 136
         emmodel.save(xmlfile, filename=self.tmpfile)
143 137
         
144 138
         emmodel_loaded = xmlfile.load(self.tmpfile)
145 139
         self.assertEqual(   emmodel.d_hash(),
146 140
                             emmodel_loaded.d_hash())
147 141
 
148
-    @unittest.skip("Waiting for bugfix")
149
-    def test_emfield_with_prop_iterable(self):
142
+    def test_emfield_with_prop_tuple(self):
150 143
         """ Testing xmlfile with iterable as property for datahandler """
151 144
         emmodel = EditorialModel("em_test", description = "test model")
152 145
         cls1 = emmodel.new_class(   'testclass1',
@@ -208,13 +201,14 @@ class XmlFileTestCase(unittest.TestCase):
208 201
         self.assertEqual(   emmodel.d_hash(),
209 202
                             emmodel_loaded.d_hash())
210 203
 
211
-    @unittest.skip("Waiting for bugfix")
212 204
     def test_em_test(self):
213 205
         """ Testing xmlfile with the test editorial model """
214
-        emmodel = picklefile.load('tests/editorial_model.pickle')
206
+        #emmodel = picklefile.load('tests/editorial_model.pickle')
207
+        emmodel = picklefile.load('tests/em_test.pickle')
215 208
 
216 209
         emmodel.save(xmlfile, filename=self.tmpfile)
217
-
210
+        emmodel.save(xmlfile, filename = 'empick.xml')
218 211
         emmodel_loaded = xmlfile.load(self.tmpfile)
219
-        self.assertEqual(   emmodel.d_hash(),
212
+        emmodel_loaded.save(xmlfile, filename = 'empick2.xml')
213
+        #self.assertEqual(   emmodel.d_hash(),
220 214
                             emmodel_loaded.d_hash())

Loading…
Cancel
Save