Browse Source

Added password test

Quentin Bonaventure 7 years ago
parent
commit
71391618c7
1 changed files with 26 additions and 0 deletions
  1. 26
    0
      tests/datahandlers/test_password.py

+ 26
- 0
tests/datahandlers/test_password.py View File

1
+import unittest
2
+from unittest import mock 
3
+from unittest.mock import patch
4
+
5
+import leapi_dyncode as dyncode
6
+
7
+from lodel.leapi.datahandlers.datas import Password as Testee
8
+
9
+
10
+class PasswordTestCase(unittest.TestCase):
11
+        
12
+        
13
+    def test_has_base_type_property(self):
14
+        self.assertTrue(hasattr(Testee, 'base_type'))
15
+        
16
+        
17
+    def test_base_type_is_password(self):
18
+        self.assertEqual(Testee.base_type, 'password')
19
+        
20
+        
21
+    def test_has_help_property(self):
22
+        self.assertTrue(hasattr(Testee, 'help'))
23
+        
24
+        
25
+    def test_help_property_str_is_set(self):
26
+        self.assertEqual(type(Testee.help), str)

Loading…
Cancel
Save