Esempio n. 1
0
 def test_init(self):
     """Check creation of MakeWebService object"""
     m = MakeWebService('root', 'Test Service', git=False)
     self.assertEqual(m.service_name, 'Test Service')
     self.assertEqual(m.short_name, 'root')
     self.assertEqual(m.user, 'root')
     self.assertEqual(m.db, 'root')
Esempio n. 2
0
 def test_make_password(self):
     """Check MakeWebService._make_password method"""
     m = MakeWebService('root', 'x', git=False)
     for pwlen in (10, 20):
         pwd = m._make_password(pwlen)
         self.assertEqual(len(pwd), pwlen)