示例#1
0
 def test_execute_vpn_options(self):
     mock_method = self._mock_vpn_options()
     command = ["vpn", "options", "azirevpn"]
     cmdline.providers["vpn"]["azirevpn"].configurations = []
     cmdline.execute(command)
     mock_method.assert_called_once()
     self._restore_vpn_options()
示例#2
0
 def test_execute_vps_purchase(self):
     self._mock_vps_options([self._create_option()])
     purchase = LineVast.purchase
     LineVast.purchase = MagicMock()
     command = ["vps", "purchase", "linevast", "-f", "-c", self.settings_file, "-rp", "asdf", "0"]
     cmdline.execute(command)
     LineVast.purchase.assert_called_once()
     LineVast.purchase = purchase
     self._restore_vps_options()
示例#3
0
 def test_execute_vpn_list(self):
     command = ["vpn", "list"]
     cmdline.execute(command)
示例#4
0
 def test_execute_vps_list(self):
     command = ["vps_bitcoin", "list"]
     cmdline.execute(command)