コード例 #1
0
ファイル: test_loader.py プロジェクト: SmartJog/lift
 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)
コード例 #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)
コード例 #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)
コード例 #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)
コード例 #5
0
ファイル: test_loader.py プロジェクト: SmartJog/lift
 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)
コード例 #6
0
ファイル: test_loader.py プロジェクト: SmartJog/lift
 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)