aboutsummaryrefslogtreecommitdiffstats
path: root/docker/db
diff options
context:
space:
mode:
authorStamatis Katsaounis <mokats@intracom-telecom.com>2018-10-04 12:42:16 +0300
committerStamatis Katsaounis <mokats@intracom-telecom.com>2018-10-04 12:42:16 +0300
commitc05e2986e658d9892c9d65203a1e2a785c68bf27 (patch)
tree329e16bee025b4db9f9f43ad143b1aca776d7bd8 /docker/db
parent19724cbcef2508f97ddcc7fdef7e7bb44288634c (diff)
Revive unit tests and flake8 of webportal
JIRA: DOVETAIL-742 This patch revives unit test and flake8 tests of webportal. In addition, it fixes errors and enables handling of some uris which were forgotten. Change-Id: I8225c7ca08a3c97b6e77f00490defc91046a2dd6 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
Diffstat (limited to 'docker/db')
-rw-r--r--docker/db/get_db_schema.py8
-rw-r--r--docker/db/init_db.py2
2 files changed, 5 insertions, 5 deletions
diff --git a/docker/db/get_db_schema.py b/docker/db/get_db_schema.py
index 1106355..16ed3da 100644
--- a/docker/db/get_db_schema.py
+++ b/docker/db/get_db_schema.py
@@ -18,7 +18,7 @@ def get(url):
try:
ret = requests.get(url)
return ret.json()
- except:
+ except Exception:
return None
@@ -28,7 +28,7 @@ def pod():
pods = get(source)['pods']
with open("pods.json", "w") as f:
f.write(json.dumps(pods, indent=4))
- except:
+ except Exception:
return
@@ -39,7 +39,7 @@ def project():
projects = get(source)['projects']
with open("projects.json", "w") as f:
f.write(json.dumps(projects, indent=4))
- except:
+ except Exception:
return
for p in projects:
@@ -52,7 +52,7 @@ def project():
f.write(json.dumps(cases))
f.write('\n')
f.close()
- except:
+ except Exception:
print("useless data")
diff --git a/docker/db/init_db.py b/docker/db/init_db.py
index 2aac6fc..afed693 100644
--- a/docker/db/init_db.py
+++ b/docker/db/init_db.py
@@ -58,7 +58,7 @@ def cases():
c['project_name'])
print(target)
post(target, c)
- except:
+ except Exception:
print("useless data")
add_case("functest", "tempest_custom")