示例#1
0
文件: test_vpnc.py 项目: xFixx/pyvpnc
 def setUp(self):
     with open(os.path.join(HERE, "config.json")) as f:
         self.vpnc = VPNC(config=json.load(f))
     assert (self.vpnc is not None)
     assert (self.vpnc.config is not None)
     assert (type(self.vpnc.config) == dict)
     assert (set(self.vpnc.config.keys()) >= set(
         ("IPSec_ID", "IPSec_gateway", "IPSec_secret", "Xauth_username",
          "Xauth_password", "IKE_Authmode")))
     assert (self.vpnc.config_file == "tempvpnc.conf")
     assert (self.vpnc.temp_config_path == os.path.join(
         ROOT, "vpnc", "tempvpnc.conf"))
     assert (self.vpnc.config_folder == "/etc/vpnc")
     assert (self.vpnc.config_path == "/etc/vpnc/tempvpnc.conf")