1. simplecodes
  2. Untitled project
  3. wtforms

Commits

James Crasta  committed e56f69d

Improve test coverage

  • Participants
  • Parent commits 06a6d88
  • Branches default

Comments (0)

Files changed (1)

File tests/fields.py

View file
  • Ignore whitespace
             self.assertEqual(repr(label), "Label(u'test', u'Caption')")
         else:
             self.assertEqual(repr(label), "Label('test', 'Caption')")
+            self.assertEqual(label.__unicode__(), expected)
 
     def test_auto_label(self):
         t1 = TextField().bind(Form(), 'foo_bar')
     def test_repr(self):
         self.assertEqual(repr(self.flags), '<wtforms.fields.Flags: {required}>')
 
+    def test_underscore_property(self):
+        self.assertRaises(AttributeError, getattr, self.flags, '_foo')
+        self.flags._foo = 42
+        self.assertEqual(self.flags._foo, 42)
+
 
 class FiltersTest(TestCase):
     class F(Form):