From 563542692701fbbaa616b9d46f94b0f97be3eb7c Mon Sep 17 00:00:00 2001 From: Jakub Kadlcik Date: Jan 13 2018 17:00:40 +0000 Subject: [frontend] remove outdated tests, see 3f62873 --- diff --git a/frontend/coprs_frontend/tests/test_views/test_api_ns/test_api_general.py b/frontend/coprs_frontend/tests/test_views/test_api_ns/test_api_general.py index 89b0c3d..2b0e436 100644 --- a/frontend/coprs_frontend/tests/test_views/test_api_ns/test_api_general.py +++ b/frontend/coprs_frontend/tests/test_views/test_api_ns/test_api_general.py @@ -103,62 +103,3 @@ class TestCreateCopr(CoprsTestCase): # self.db.session.add_all([self.u1, self.mc1]) # # - - -class TestModuleRepo(CoprsTestCase): - endpoint = "/api/module/repo/" - - def test_api_module_repo(self, f_users, f_coprs, f_modules, f_db): - data = {"owner": self.u1.name, "copr": self.c1.name, "name": "first-module", - "stream": "foo", "version": 1, "arch": "x86_64"} - - r = self.tc.post(self.endpoint, data=data) - response = json.loads(r.data.decode("utf-8")) - assert response["output"] == "ok" - assert response["repo"] == "http://copr-be-dev.cloud.fedoraproject.org/results/user1/foocopr/modules/"\ - "fedora-24-x86_64+first-module-foo-1/latest/x86_64" - - def test_api_module_repo_no_params(self): - error = "This field is required." - r = self.tc.post(self.endpoint, data={}) - response = json.loads(r.data.decode("utf-8")) - assert response["output"] == "notok" - for key in ["owner", "copr", "name", "stream", "version", "arch"]: - assert error in response["error"][key] - - -class TestBuildModule(CoprsTestCase): - @TransactionDecorator("u1") - def test_api_build_module_basic(self, f_users, f_coprs, f_db): - self.db.session.add_all([self.u1, self.c1]) - self.tc.post("/api/new/") - - fd, filename = tempfile.mkstemp() - os.write(fd, b""" - data: - api: - rpms: [example-debuginfo] - components: {} - description: '' - filter: - rpms: [example-debuginfo, example] - license: - module: [] - name: project - profiles: - default: - rpms: [example] - stream: test - summary: 'Module from Copr repository: clime/project' - version: 1 - document: modulemd - version: 1 - """) - os.close(fd) - - f = open(filename, "rb") - data = {"modulemd": (filename, f.read().decode("utf-8"), "application/yaml")} - api_endpoint = '/api/coprs/{}/{}/module/make/'.format(self.u1.name, self.c1.name) - r = self.post_api_with_auth(api_endpoint, content=data, user=self.u1) - assert r.status_code == 200 - os.remove(filename)