Merge lp:~rharding/python-jujuclient/adjust_constraint_handling into lp:~hazmat/python-jujuclient/trunk
Status: | Needs review |
---|---|
Proposed branch: | lp:~rharding/python-jujuclient/adjust_constraint_handling |
Merge into: | lp:~hazmat/python-jujuclient/trunk |
Diff against target: |
211 lines (+146/-7) 5 files modified
.bzrignore (+16/-0) README.rst (+21/-1) jujuclient.py (+29/-4) setup.py (+4/-2) tests/test_environment.py (+76/-0) |
To merge this branch: | bzr merge lp:~rharding/python-jujuclient/adjust_constraint_handling |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Kapil Thangavelu | Disapprove | ||
Review via email: mp+194176@code.launchpad.net |
Commit message
Adjust constraint handling to drop unknown ones.
- Adjust tests and test runner along with README updates.
Description of the change
Adjust constraint handling to drop unknown ones.
- Setup a whitelist for constraints for now until we get better messaging from the client through the deployer setup.
- Update the parse_constraints helper to drop constraints that aren't valid and perform the type casting as it was.
- Update with a new tests directory and update setup.py to be able to run python setup.py test
- Update README with some beginner hacking information
- Move the function tests to a different filename and +x it so that nose would skip it during normal test runs. It's meant to be run manually with an environment
- add a .bzrignore file
Unmerged revisions
- 21. By Richard Harding
-
Update per review correctly this time
- 20. By Richard Harding
-
Update per review, remember to +x the test_functional file
- 19. By Richard Harding
-
Adjust test running, add constraint checking
Line 49 of the diff has the last two characters on the line transposed ("test.s").
Since we don't really use the type of the constraints unless it is "int", perhaps a boolean instead of "int"/"str" would be more direct.
On line 178 and line 212 of the diff you could use mock.assert_ called_ once_with( ...) instead.