Module: check_mk
Branch: master
Commit: e41713e6d5ac9b04af89d8fb39ec48a82db3b1da
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e41713e6d5ac9b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Feb 7 08:31:45 2019 +0100
Fixed web integration test
Change-Id: I45bfe8b5e369ade27ea399d8789b5e5cc1e45295
---
tests/integration/cmk/gui/test_webapi.py | 56 +++++++++++++-------------------
1 file changed, 22 insertions(+), 34 deletions(-)
diff --git a/tests/integration/cmk/gui/test_webapi.py
b/tests/integration/cmk/gui/test_webapi.py
index 64e9fdf..51c28c1 100644
--- a/tests/integration/cmk/gui/test_webapi.py
+++ b/tests/integration/cmk/gui/test_webapi.py
@@ -212,17 +212,13 @@ def test_get_all_sites(web, site):
assert site.id in response["sites"]
-(a)pytest.mark.parametrize(
- "sock_spec",
- [
- "tcp:1.2.3.4:6557",
- (
- "tcp",
- {
- "address": ("1.2.3.4", 6557),
- #"tls": ("plain_text", {}),
- }),
- ])
+(a)pytest.mark.parametrize("sock_spec"spec", [
+ "tcp:1.2.3.4:6557",
+ ("tcp", {
+ "address": ("1.2.3.4", 6557),
+ "tls": ("plain_text", {}),
+ }),
+])
def test_set_site(web, site, sock_spec):
original_site = web.get_site(site.id)
assert site.id == original_site["site_id"]
@@ -232,12 +228,10 @@ def test_set_site(web, site, sock_spec):
new_site_config["socket"] = sock_spec
expected_site_config = copy.deepcopy(original_site["site_config"])
- expected_site_config["socket"] = (
- "tcp",
- {
- "address": ("1.2.3.4", 6557),
- #"tls": ("plain_text", {}),
- })
+ expected_site_config["socket"] = ("tcp", {
+ "address": ("1.2.3.4", 6557),
+ "tls": ("plain_text", {}),
+ })
try:
web.set_site(new_site_id, new_site_config)
@@ -253,17 +247,13 @@ def test_set_site(web, site, sock_spec):
web.delete_site(new_site_id)
-(a)pytest.mark.parametrize(
- "sock_spec",
- [
- "tcp:1.2.3.4:6557",
- (
- "tcp",
- {
- "address": ("1.2.3.4", 6557),
- #"tls": ("plain_text", {}),
- }),
- ])
+(a)pytest.mark.parametrize("sock_spec"spec", [
+ "tcp:1.2.3.4:6557",
+ ("tcp", {
+ "address": ("1.2.3.4", 6557),
+ "tls": ("plain_text", {}),
+ }),
+])
def test_set_all_sites(web, site, sock_spec):
response = web.get_all_sites()
del response["configuration_hash"]
@@ -274,12 +264,10 @@ def test_set_all_sites(web, site, sock_spec):
new_site_config["socket"] = sock_spec
expected_site_config =
copy.deepcopy(copy.deepcopy(response["sites"][site.id]))
- expected_site_config["socket"] = (
- "tcp",
- {
- "address": ("1.2.3.4", 6557),
- #"tls": ("plain_text", {}),
- })
+ expected_site_config["socket"] = ("tcp", {
+ "address": ("1.2.3.4", 6557),
+ "tls": ("plain_text", {}),
+ })
response["sites"][new_site_id] = new_site_config