Skip to content

Commit

Permalink
Merge pull request #86 from mdsol/develop
Browse files Browse the repository at this point in the history
Merge updated develop to master for deployment
  • Loading branch information
isparks authored Jun 14, 2018
2 parents ca649f4 + a969170 commit f218e75
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 11 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: python
python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "3.6"
Expand Down
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ Authors
- Andrew Newbigging <anewbigging@mdsol.com>
- Oli Quinet <https://github.com/Oli76>
- Daniel Smoczyk <https://github.com/dPeS>
- Bastien Gerard <https://github.com/bagerard>
2 changes: 1 addition & 1 deletion rwslib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
26 changes: 18 additions & 8 deletions rwslib/tests/test_rwscmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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)

Expand All @@ -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)

Expand Down Expand Up @@ -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)
Expand All @@ -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)

Expand Down
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/',
Expand Down

0 comments on commit f218e75

Please sign in to comment.