diff --git a/.travis.yml b/.travis.yml index c1776c7..f6b0839 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: python python: - "2.7" - - "3.3" - "3.4" - "3.5" - "3.6" diff --git a/AUTHORS.rst b/AUTHORS.rst index da34f1c..bd78bbb 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -8,3 +8,4 @@ Authors - Andrew Newbigging - Oli Quinet - Daniel Smoczyk +- Bastien Gerard diff --git a/rwslib/__init__.py b/rwslib/__init__.py index 757a66f..805bdca 100644 --- a/rwslib/__init__.py +++ b/rwslib/__init__.py @@ -2,7 +2,7 @@ __title__ = 'rwslib' __author__ = 'Ian Sparks (isparks@mdsol.com)' -__version__ = '1.2.1' +__version__ = '1.2.2' __license__ = 'MIT' __copyright__ = 'Copyright 2017 Medidata Solutions Inc' diff --git a/rwslib/tests/test_rwscmd.py b/rwslib/tests/test_rwscmd.py index eac033a..1b12abb 100644 --- a/rwslib/tests/test_rwscmd.py +++ b/rwslib/tests/test_rwscmd.py @@ -2,11 +2,12 @@ __author__ = 'anewbigging' -import sys +import unittest + +import httpretty from click.testing import CliRunner + from rwslib.extras.rwscmd import rwscmd -import httpretty -import unittest class TestRWSCMD(unittest.TestCase): @@ -335,8 +336,12 @@ def test_autofill(self): result = self.runner.invoke(rwscmd.rws, ["--verbose", 'https://innovate.mdsol.com', 'autofill', 'Test', 'Prod', '001'], input="defuser\npassword\n") - self.assertIn("Step 1\nGetting data list\nGetting metadata version 1\nGenerating data", result.output) - self.assertIn("Step 10\nGetting data list\nGenerating data", result.output) + output = result.output + self.assertIn("Step 1\nGetting data list", output) + self.assertIn("Getting metadata version 1", output) + self.assertIn("Step 10\nGetting data list", output) + self.assertIn("Generating data", output) + self.assertEqual(10, output.count("Generating data")) self.assertNotIn("Step 11", result.output) self.assertEqual(result.exit_code, 0) @@ -346,7 +351,9 @@ def test_autofill_steps(self): 'Test', 'Prod', '001'], input="defuser\npassword\n") - self.assertIn("Step 1\nGetting data list\nGetting metadata version 1\nGenerating data", result.output) + self.assertIn("Step 1\nGetting data list", result.output) + self.assertIn("Getting metadata version 1\n", result.output) + self.assertIn("Generating data", result.output) self.assertNotIn("Step 2", result.output) self.assertEqual(result.exit_code, 0) @@ -379,7 +386,9 @@ def test_autofill_fixed(self): input=u"defuser\npassword\n", catch_exceptions=False) self.assertFalse(result.exception) - self.assertIn("Step 1\nGetting data list\nGetting metadata version 1\nGenerating data", result.output) + self.assertIn("Step 1\nGetting data list", result.output) + self.assertIn("Getting metadata version 1", result.output) + self.assertIn("Generating data", result.output) self.assertIn('Fixing YN to value: 99', result.output) self.assertNotIn("Step 2", result.output) self.assertEqual(result.exit_code, 0) @@ -394,7 +403,8 @@ def test_autofill_metadata(self): '--metadata', 'odm.xml', 'Test', 'Prod', '001'], input=u"defuser\npassword\n", catch_exceptions=False) self.assertFalse(result.exception) - self.assertIn("Step 1\nGetting data list\nGenerating data", result.output) + self.assertIn("Step 1\nGetting data list", result.output) + self.assertIn("Generating data", result.output) self.assertNotIn("Step 2", result.output) self.assertEqual(result.exit_code, 0) diff --git a/setup.py b/setup.py index 9b80134..70d3619 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,14 @@ packages=packages, package_dir={'rwslib': 'rwslib'}, include_package_data=True, - install_requires=['requests', 'lxml', 'httpretty', 'six', 'click', 'faker', 'enum34'], + install_requires=('requests', + 'lxml', + 'httpretty', + 'six', + 'click', + 'faker', + "enum34; python_version < '3.4'", + ), tests_require=['mock'], license=open('LICENSE.txt').read(), url='https://github.com/mdsol/rwslib/',