entities/test/unittest_base.py
changeset 10411 4ee15441f2eb
parent 10251 2daa5c6dea4d
parent 10402 e3c20f4d1a7c
child 10662 10942ed172de
--- a/entities/test/unittest_base.py	Mon Jun 22 14:15:16 2015 +0200
+++ b/entities/test/unittest_base.py	Mon Jun 22 14:27:37 2015 +0200
@@ -137,10 +137,16 @@
             self.assertEqual(e.dc_title(), 'member')
             self.assertEqual(e.name(), u'bouah lôt')
 
+    def test_falsey_dc_title(self):
+        with self.admin_access.repo_cnx() as cnx:
+            e = cnx.create_entity('Company', order=0, name=u'pythonian')
+            cnx.commit()
+            self.assertEqual(u'0', e.dc_title())
+
     def test_allowed_massmail_keys(self):
         with self.admin_access.repo_cnx() as cnx:
             e = cnx.execute('CWUser U WHERE U login "member"').get_entity(0, 0)
-            # Bytes/Password attributes should be omited
+            # Bytes/Password attributes should be omitted
             self.assertEqual(e.cw_adapt_to('IEmailable').allowed_massmail_keys(),
                               set(('surname', 'firstname', 'login', 'last_login_time',
                                    'creation_date', 'modification_date', 'cwuri', 'eid'))