| |
@@ -373,6 +373,25 @@
|
| |
}
|
| |
assert actual == expected
|
| |
|
| |
+ def test_query_builds_with_nsvc(self):
|
| |
+ nsvcs = ["testmodule:4.3.43:7:00000000",
|
| |
+ "testmodule:4.3.43:7",
|
| |
+ "testmodule:4.3.43",
|
| |
+ "testmodule"]
|
| |
+
|
| |
+ results = []
|
| |
+ for nsvc in nsvcs:
|
| |
+ rv = self.client.get('/module-build-service/1/module-builds/?nsvc=%s&per_page=2' % nsvc)
|
| |
+ results.append(json.loads(rv.data)['items'])
|
| |
+
|
| |
+ nsvc_keys = ["name", "stream", "version", "context"]
|
| |
+
|
| |
+ for items, nsvc in zip(results, nsvcs):
|
| |
+ nsvc_parts = nsvc.split(":")
|
| |
+ for item in items:
|
| |
+ for key, part in zip(nsvc_keys, nsvc_parts):
|
| |
+ assert item[key] == part
|
| |
+
|
| |
def test_query_component_build(self):
|
| |
rv = self.client.get('/module-build-service/1/component-builds/1')
|
| |
data = json.loads(rv.data)
|
| |
Hi All,
added the ability to search mbs with an NSVC string. Right now you have to split the string before searching. + test
@ralph @mprahl @jkaluza Can you take a look?
Signed-off-by: Martin Curlej mcurlej@redhat.com