コード例 #1
0
 def test_get_routes(self):
     '''
     Test to return the contents of the interface routes script.
     '''
     with patch.object(os.path, 'join', return_value='A'):
         with patch.object(rh_ip, '_read_file', return_value=['A']):
             self.assertEqual(rh_ip.get_routes('iface'), ['A', 'A'])
コード例 #2
0
ファイル: rh_ip_test.py プロジェクト: shineforever/ops
 def test_get_routes(self):
     '''
     Test to return the contents of the interface routes script.
     '''
     with patch.object(os.path, 'join', return_value='A'):
         with patch.object(rh_ip, '_read_file', return_value='A'):
             self.assertEqual(rh_ip.get_routes('iface'), 'A')
コード例 #3
0
ファイル: test_rh_ip.py プロジェクト: nicholasmhughes/salt
 def test_get_routes(self):
     """
     Test to return the contents of the interface routes script.
     """
     with patch.object(os.path, "join", return_value="A"):
         with patch.object(rh_ip, "_read_file", return_value=["A"]):
             self.assertEqual(rh_ip.get_routes("iface"), ["A", "A"])