コード例 #1
0
 def test_get_os_distrib(self, python, p_execute_command):
     d = ssh_remote._get_os_distrib()
     p_execute_command.assert_called_once_with(
         ('printf "import platform\nprint(platform.linux_distribution('
          'full_distribution_name=0)[0])" | python3'),
         run_as_root=False)
     self.assertEqual('ubuntu', d)
コード例 #2
0
ファイル: test_ssh_remote.py プロジェクト: openstack/sahara
 def test_get_os_distrib(self, python, p_execute_command):
     d = ssh_remote._get_os_distrib()
     p_execute_command.assert_called_once_with(
         ('printf "import platform\nprint(platform.linux_distribution('
          'full_distribution_name=0)[0])" | python3'),
         run_as_root=False)
     self.assertEqual('ubuntu', d)