diff options
author | Tomasz Bursztyka <tomasz.bursztyka@nokia.com> | 2010-10-07 10:40:05 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-10-07 13:31:47 +0200 |
commit | 8e273c5f42e72158da0a11529dcdad11a7079d95 (patch) | |
tree | 27d92e3a0c587453cf33f9628ead29f1a35f389b /test | |
parent | 2aed7a549e25e099431e0543e19eca8175452141 (diff) | |
download | connman-8e273c5f42e72158da0a11529dcdad11a7079d95.tar.gz connman-8e273c5f42e72158da0a11529dcdad11a7079d95.tar.bz2 connman-8e273c5f42e72158da0a11529dcdad11a7079d95.zip |
Pretty printers for proxy settings in various test tool.
Diffstat (limited to 'test')
-rwxr-xr-x | test/get-services | 9 | ||||
-rwxr-xr-x | test/list-providers | 8 | ||||
-rwxr-xr-x | test/list-services | 5 | ||||
-rwxr-xr-x | test/monitor-services | 5 | ||||
-rwxr-xr-x | test/test-manager | 8 |
5 files changed, 26 insertions, 9 deletions
diff --git a/test/get-services b/test/get-services index d337e0ca..3fec3940 100755 --- a/test/get-services +++ b/test/get-services @@ -6,7 +6,10 @@ def extract_values(values): val = "{" for key in values.keys(): val += " " + key + "=" - val += str(values[key]) + if key in ["Servers", "Excludes"]: + val += extract_list(values[key]) + else: + val += str(values[key]) val += " }" return val @@ -33,8 +36,8 @@ for entry in services: for key in properties.keys(): if key in ["IPv4", "IPv4.Configuration", "IPv6", "IPv6.Configuration", - "Proxy", "Ethernet", - "Provider"]: + "Proxy", "Proxy.Configuration", + "Ethernet", "Provider"]: val = extract_values(properties[key]) elif key in ["Nameservers", "Nameservers.Configuration", "Domains", "Domains.Configuration"]: diff --git a/test/list-providers b/test/list-providers index 94375d55..84976859 100755 --- a/test/list-providers +++ b/test/list-providers @@ -9,7 +9,10 @@ def extract_values(values): if key in ["PrefixLength"]: val += "%s" % (int(values[key])) else: - val += str(values[key]) + if key in ["Servers", "Excludes"]: + val += extract_list(values[key]) + else: + val += str(values[key]) val += " }" return val @@ -38,7 +41,8 @@ for path in properties["Providers"]: for key in properties.keys(): if key in ["IPv4", "IPv4.Configuration", "IPv6", "IPv6.Configuration", - "Proxy", "Ethernet", "Provider"]: + "Proxy", "Proxy.Configuration", + "Ethernet", "Provider"]: val = extract_values(properties[key]) elif key in ["Nameservers", "Nameservers.Configuration", "Domains", "Domains.Configuration"]: diff --git a/test/list-services b/test/list-services index 88eea693..c4ae5d75 100755 --- a/test/list-services +++ b/test/list-services @@ -9,7 +9,10 @@ def extract_values(values): if key in ["PrefixLength"]: val += "%s" % (int(values[key])) else: - val += str(values[key]) + if key in ["Servers", "Excludes"]: + val += extract_list(values[key]) + else: + val += str(values[key]) val += " }" return val diff --git a/test/monitor-services b/test/monitor-services index ceeba790..b7c95de8 100755 --- a/test/monitor-services +++ b/test/monitor-services @@ -9,7 +9,10 @@ def extract_values(values): val = "{" for key in values.keys(): val += " " + key + "=" - val += str(values[key]) + if key in ["Servers", "Excludes"]: + val += extract_list(values[key]) + else: + val += str(values[key]) val += " }" return val diff --git a/test/test-manager b/test/test-manager index b5a2530c..2a967f56 100755 --- a/test/test-manager +++ b/test/test-manager @@ -9,7 +9,10 @@ def extract_values(values): if key in ["PrefixLength"]: val += "%s" % (int(values[key])) else: - val += str(values[key]) + if key in ["Servers", "Excludes"]: + val += extract_list(values[key]) + else: + val += str(values[key]) val += " }" return val @@ -64,7 +67,8 @@ def print_properties(key, value): elif key in ["IPv4", "IPv4.Configuration", "IPv6", "IPv6.Configuration", - "Proxy", "Ethernet", "Provider"]: + "Proxy", "Proxy.Configuration", + "Ethernet", "Provider"]: val = extract_values(properties[key]) elif key in ["Nameservers", "Nameservers.Configuration", |