Code Review
/
dcaegen2
/
platform.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
codecoverage improvement
[dcaegen2/platform.git]
/
mod
/
distributorapi
/
tests
/
test_registry_client.py
diff --git
a/mod/distributorapi/tests/test_registry_client.py
b/mod/distributorapi/tests/test_registry_client.py
index
3767242
..
cd80e3a
100644
(file)
--- a/
mod/distributorapi/tests/test_registry_client.py
+++ b/
mod/distributorapi/tests/test_registry_client.py
@@
-1,5
+1,5
@@
# ============LICENSE_START=======================================================
# ============LICENSE_START=======================================================
-# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2019
-2022
AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@
-18,9
+18,7
@@
from distributor import registry_client as rc
def test_add_url_from_link():
def test_add_url_from_link():
- test = {"link": {"href": "bar"}, "name": "jane", "age": 33,
- "innerTest": {"link": {"href": "baz"}, "name": "bob"}
- }
+ test = {"link": {"href": "bar"}, "name": "jane", "age": 33, "innerTest": {"link": {"href": "baz"}, "name": "bob"}}
result = rc._add_url_from_link("http://foo", test)
assert result["selfUrl"] == "http://foo/bar"
result = rc._add_url_from_link("http://foo", test)
assert result["selfUrl"] == "http://foo/bar"
@@
-62,8
+60,7
@@
def test_flow_versions(monkeypatch):
print(url)
return []
print(url)
return []
- monkeypatch.setattr(distributor.registry_client, "_get_json",
- fake_get_json_many)
+ monkeypatch.setattr(distributor.registry_client, "_get_json", fake_get_json_many)
assert [3, 2, 1] == rc.get_flow_versions("http://registry/buckets/123/flows/abc/")
assert [3, 2, 1] == rc.get_flow_versions("http://registry/buckets/123/flows/abc/")
@@
-72,7
+69,6
@@
def test_get_flow_diff_latest(monkeypatch):
def fake_get_flow_versions(url):
return ["1"]
def fake_get_flow_versions(url):
return ["1"]
- monkeypatch.setattr(distributor.registry_client, "get_flow_versions",
- fake_get_flow_versions)
+ monkeypatch.setattr(distributor.registry_client, "get_flow_versions", fake_get_flow_versions)
assert None == rc.get_flow_diff_latest("http://registry", "http://registry/buckets/123/flows/abc/")
assert None == rc.get_flow_diff_latest("http://registry", "http://registry/buckets/123/flows/abc/")