diff --git a/dist-git.spec b/dist-git.spec index fc57f0c..025b06b 100644 --- a/dist-git.spec +++ b/dist-git.spec @@ -34,10 +34,17 @@ Requires: python-requests Requires: python-configparser Requires: python-grokmirror Requires: fedmsg +BuildRequires: python-nose +BuildRequires: python-nose-parameterized +BuildRequires: python-requests +BuildRequires: python-configparser %else Requires: python3-requests Recommends: python3-grokmirror Requires: python3-fedmsg +BuildRequires: python3-nose +BuildRequires: python3-parameterized +BuildRequires: python3-requests %endif %description @@ -95,6 +102,10 @@ getent group packager > /dev/null || \ exit 0 +%check +nosetests . + + %install # ------------------------------------------------------------------------------ # /usr/share/ ........... scripts diff --git a/tests/test_upload_script.py b/tests/test_upload_script.py index 9bef1d9..cbd6fdc 100644 --- a/tests/test_upload_script.py +++ b/tests/test_upload_script.py @@ -17,10 +17,16 @@ import requests import time import random from configparser import ConfigParser -from parameterized import parameterized PY2 = sys.version_info.major == 2 +if PY2: + NOSE_PARAMETERIZED_NO_WARN=1 + from nose_parameterized import parameterized +else: + from parameterized import parameterized + + # Path to the actual CGI script that should be tested CGI_SCRIPT = os.path.join(os.path.dirname(__file__), '../scripts/httpd/upload.cgi')