Esempio n. 1
0
 def test_to_string(self):
     """Check with a full remote"""
     res = remote_to_string({'host': '127.0.0.1',
                             'username': '******',
                             'password': '******'})
     self.assertEqual(res, 'login:[email protected]',
                      'The function returned: %s' % res)
Esempio n. 2
0
 def test_to_string(self):
     """Check with a full remote"""
     res = remote_to_string({
         "host": "127.0.0.1",
         "username": "******",
         "password": "******"
     })
     self.assertEqual(res, "login:[email protected]",
                      "The function returned: %s" % res)
Esempio n. 3
0
 def test_to_string_bad_input(self):
     """Check that the function returns None with a non-compliant input"""
     res = remote_to_string({"foobar": 42})
     self.assertEqual(res, None, "The function returned: %s" % res)
Esempio n. 4
0
 def test_to_string_no_pass(self):
     """Check without the optional password"""
     res = remote_to_string({"host": "127.0.0.1", "username": "******"})
     self.assertEqual(res, "[email protected]",
                      "The function returned: %s" % res)
Esempio n. 5
0
 def test_to_string_bad_input(self):
     """Check that the function returns None with a non-compliant input"""
     res = remote_to_string({'foobar': 42})
     self.assertEqual(res, None, 'The function returned: %s' % res)
Esempio n. 6
0
 def test_to_string_no_pass(self):
     """Check without the optional password"""
     res = remote_to_string({'host': '127.0.0.1',
                             'username': '******'})
     self.assertEqual(res, '[email protected]',
                      'The function returned: %s' % res)