diff --git a/rpmbuild/copr-rpmbuild.spec b/rpmbuild/copr-rpmbuild.spec index 13126ba2c..88a9c4c90 100644 --- a/rpmbuild/copr-rpmbuild.spec +++ b/rpmbuild/copr-rpmbuild.spec @@ -28,9 +28,7 @@ Source0: %name-%version.tar.gz BuildRequires: %{python}-copr-common >= %copr_common_version BuildRequires: %{python}-devel BuildRequires: %{python}-distro -%if 0%{?rhel} == 0 || 0%{?rhel} != 6 BuildRequires: %{python}-httmock -%endif BuildRequires: %{rpm_python} BuildRequires: asciidoc BuildRequires: dist-git-client diff --git a/rpmbuild/tests/test_spec.py b/rpmbuild/tests/test_spec.py index e74983700..62d64cbec 100644 --- a/rpmbuild/tests/test_spec.py +++ b/rpmbuild/tests/test_spec.py @@ -1,23 +1,16 @@ import configparser - import os -import distro -import pytest - -try: - from httmock import urlmatch, HTTMock - - @urlmatch(netloc=r'(.*\.)?example\.com$') - def example_com_match(url, request): - return 'some-content' - -except: - pass +from httmock import urlmatch, HTTMock from copr_rpmbuild.providers.spec import UrlProvider from . import TestCase +@urlmatch(netloc=r'(.*\.)?example\.com$') +def example_com_match(url, request): + return 'some-content' + + try: from unittest import mock builtins = 'builtins' @@ -79,9 +72,6 @@ def auto_test_setup(self): def auto_test_cleanup(self): self.cleanup_basic_dirs() - @pytest.mark.skipif(distro.id() in ['rhel', 'centos'] and - distro.major_version() == '6', - reason='on httmock on rhel6') def test_srpm_query_string(self): with HTTMock(example_com_match): provider = UrlProvider(self.json_1, self.config) @@ -93,9 +83,6 @@ def test_srpm_query_string(self): with open(file, 'r') as f: assert f.read() == 'some-content' - @pytest.mark.skipif(distro.id() in ['rhel', 'centos'] and - distro.major_version() == '6', - reason='on httmock on rhel6') def test_spec_query_string(self): with HTTMock(example_com_match): provider = UrlProvider(self.json_2, self.config)