Commits

Anonymous committed ddb8450

Adapted tests

Comments (0)

Files changed (2)

       multiple rows. Further the will check if there are further html
       tags allowed.</help>
     </entity>
-    <entity id="e4" name="date" label="Date field" type="date" autocomplete="off" css="datefield" number="1" readonly="true">
+    <entity id="e4" name="date" label="Date field" type="date" autocomplete="off" css="datefield" number="1">
       <help>This is my helptext</help>
     </entity>
     <entity id="e8" name="select">
   </form>
   <form id="testform">
   </form>
-  <form id="customform" css="testcss" readonly="true" autocomplete="off" method="GET" action="http://" enctype="multipart/form-data">
+  <form id="customform" css="testcss" readonly="false" autocomplete="off" method="GET" action="http://" enctype="multipart/form-data">
     <row>
       <col><field ref="e1"/></col>
     </row>
       <col><field ref="e2"/></col>
     </row>
   </snippet>
+  <form id="customform-readonly" css="testcss" readonly="false" autocomplete="off" method="GET" action="http://" enctype="multipart/form-data">
+    <row>
+      <col><field ref="e1"/></col>
+    </row>
+    <snippet ref="s1"/>
+  </form>
 </configuration>

test/test_configparser.py

         self.assertEqual(self.dform.readonly, False)
 
     def test_readonly_custom(self):
-        self.assertEqual(self.cform.readonly, True)
+        self.assertEqual(self.cform.readonly, False)
 
     def test_id_default(self):
         self.assertEqual(self.dform.id, 'testform')
         self.assertEqual(self.sfield.readonly, False)
 
     def test_readonly_custom(self):
-        self.assertEqual(self.dfield.readonly, True)
+        self.assertEqual(self.dfield.readonly, False)
 
     def test_css_default(self):
         self.assertEqual(self.dfield.css, '')
         self.assertEqual(self.cfield.number, '1')
 
     def test_type_default(self):
-        self.assertEqual(self.dfield.type, 'string')
+        self.assertEqual(self.dfield.type, None)
 
     def test_type_custom(self):
         self.assertEqual(self.cfield.type, 'date')
         self.assertEqual(len(self.dfield.rules), 0)
 
     def test_rules_custom(self):
-        self.assertEqual(len(self.ifield.rules), 2)
+        self.assertEqual(len(self.ifield.rules), 1)
 
 if __name__ == '__main__':
     unittest.main()