summaryrefslogtreecommitdiff
path: root/src/leap/eip
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/eip')
-rw-r--r--src/leap/eip/config.py11
-rw-r--r--src/leap/eip/tests/test_config.py20
2 files changed, 8 insertions, 23 deletions
diff --git a/src/leap/eip/config.py b/src/leap/eip/config.py
index b461422a..8d5c19da 100644
--- a/src/leap/eip/config.py
+++ b/src/leap/eip/config.py
@@ -1,17 +1,16 @@
import ConfigParser
-import grp
import logging
import os
-import json
import platform
import socket
from leap.util.fileutil import (which, mkdir_p,
check_and_fix_urw_only)
-from leap.base.configuration import (get_default_provider_path,
- get_config_file,
- get_username,
- get_groupname)
+from leap.base.config import (get_default_provider_path,
+ get_config_file,
+ get_username,
+ get_groupname,
+ validate_ip)
from leap.baseapp.permcheck import (is_pkexec_in_system,
is_auth_agent_running)
from leap.eip import exceptions as eip_exceptions
diff --git a/src/leap/eip/tests/test_config.py b/src/leap/eip/tests/test_config.py
index 0e1a3a01..3c5a1cde 100644
--- a/src/leap/eip/tests/test_config.py
+++ b/src/leap/eip/tests/test_config.py
@@ -1,9 +1,7 @@
import ConfigParser
import os
import platform
-import shutil
import socket
-import tempfile
try:
import unittest2 as unittest
@@ -11,7 +9,8 @@ except ImportError:
import unittest
from leap.testing.basetest import BaseLeapTest
-from leap.eip import config
+from leap.base import config as base_config
+from leap.eip import config as eip_config
_system = platform.system()
@@ -30,19 +29,6 @@ class EIPConfigTest(BaseLeapTest):
# helpers
#
- def get_username(self):
- return config.get_username()
-
- def get_groupname(self):
- return config.get_groupname()
-
- def _missing_test_for_plat(self, do_raise=False):
- if do_raise:
- raise NotImplementedError(
- "This test is not implemented "
- "for the running platform: %s" %
- _system)
-
def touch_exec(self):
tfile = os.path.join(
self.tempfile,
@@ -90,7 +76,7 @@ class EIPConfigTest(BaseLeapTest):
def test_build_ovpn_command_empty_config(self):
_config = self.get_empty_config()
- command, args = config.build_ovpn_command(
+ command, args = eip_config.build_ovpn_command(
_config,
do_pkexec_check=False)
self.assertEqual(command, 'openvpn')