Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests that assert CommandExecutionError #32485

Merged
merged 1 commit into from
Apr 12, 2016
Merged

Fix tests that assert CommandExecutionError #32485

merged 1 commit into from
Apr 12, 2016

Conversation

eradman
Copy link
Contributor

@eradman eradman commented Apr 11, 2016

What does this PR do?

Unbreak the following tests:

unit.modules.linux_sysctl_test.LinuxSysctlTestCase.test_persist_no_conf_failure
unit.modules.mac_sysctl_test.DarwinSysctlTestCase.test_persist_no_conf_failure
unit.modules.mount_test.MountTestCase.test_rm_automaster
unit.modules.mount_test.MountTestCase.test_rm_fstab
unit.modules.puppet_test.PuppetTestCase.test_disable
unit.modules.puppet_test.PuppetTestCase.test_summary

Explanation

Trying to assert that an exception was raised using
helper_open.write.assertRaises() is bogus--there is no such method. Use
standard unittest.assertRaises() instead.

Previous Behavior:

*** unit.modules.linux_sysctl_test.LinuxSysctlTestCase.test_persist_no_conf_failure Tests  ************
 --------  Tests with Errors  -------------------------------------------------------------------------
   -> unit.modules.linux_sysctl_test.LinuxSysctlTestCase.test_persist_no_conf_failure  ................
       Traceback (most recent call last):
         File "/tmp/saltenv/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
           return func(*args, **keywargs)
         File "/u/en/radman/git/salt-dev/tests/unit/modules/linux_sysctl_test.py", line 94, in test_persist_no_conf_failure
           helper_open.write.assertRaises(CommandExecutionError,
         File "/tmp/saltenv/lib/python2.7/site-packages/mock/mock.py", line 703, in __getattr__
           raise AttributeError(name)
       AttributeError: assertRaises

Trying to assert that an exception was raised using
helper_open.write.assertRaises() is bogus--there is no such method. Use
standard unittest.assertRaises() instead.
@cachedout cachedout merged commit bae492a into saltstack:develop Apr 12, 2016
@eradman eradman deleted the assert_raises branch April 12, 2016 15:04
cachedout pushed a commit that referenced this pull request Apr 13, 2016
* Fix tests that assert CommandExecutionError (#32485)

Trying to assert that an exception was raised using
helper_open.write.assertRaises() is bogus--there is no such method. Use
standard unittest.assertRaises() instead.

* Allow user class to be blank

Attempts to address Issue#32512
gitebra pushed a commit to gitebra/salt that referenced this pull request Apr 13, 2016
* upstream/develop:
  these are no longer loaded by the loader and proved to be (saltstack#32548)
  PY3: salt-key --gen-keys fix (saltstack#32546)
  Avoid KeyError if cron change does not include a diff (saltstack#32513)
  Allow user login class to be empty on OpenBSD (saltstack#32518)
  Add get_issue_comments function to the github module (saltstack#32522)
  Fix YAML-block in "Organizing Pillar data" part of "Salt Formulas" docs page (saltstack#32527)
  Updated rsync module _virtual__. (saltstack#32524)
  Fix salt-call on standalone minion case (saltstack#32521)
  Document "grains" setting in the minion configuration reference (saltstack#32528)
  Add site bindings to win_iis (saltstack#32530)
  Fix rendering error with thorium docs
  Fix tests that assert CommandExecutionError (saltstack#32485)
  Various boto2 module enhancements (saltstack#32496)
  Fixing Unicode Error / Accept Eula Windows Update Modules/States (saltstack#32502)
  Add ability to configure DynamoDB backups using pillars (saltstack#32503)
  Add Cumulus support to aptpkg (saltstack#32504)
  Small typo fix (saltstack#32498)
  Closes saltstack#31078 - Add options for syslog returner (saltstack#32464)
  [develop] Merge forward from 2016.3 to develop (saltstack#32494)
  Add applications to win_iis (saltstack#32483)
rallytime pushed a commit to rallytime/salt that referenced this pull request Apr 15, 2016
Trying to assert that an exception was raised using
helper_open.write.assertRaises() is bogus--there is no such method. Use
standard unittest.assertRaises() instead.
meaksh pushed a commit to meaksh/salt that referenced this pull request Sep 8, 2016
Trying to assert that an exception was raised using
helper_open.write.assertRaises() is bogus--there is no such method. Use
standard unittest.assertRaises() instead.
meaksh pushed a commit to meaksh/salt that referenced this pull request Sep 8, 2016
Trying to assert that an exception was raised using
helper_open.write.assertRaises() is bogus--there is no such method. Use
standard unittest.assertRaises() instead.
meaksh pushed a commit to meaksh/salt that referenced this pull request Sep 8, 2016
Trying to assert that an exception was raised using
helper_open.write.assertRaises() is bogus--there is no such method. Use
standard unittest.assertRaises() instead.
gitebra pushed a commit to gitebra/salt that referenced this pull request Sep 9, 2016
* upstream/develop: (111 commits)
  Pylint fix
  Remove redundant write of public key.
  Fix breakage from updates to __utils__ (saltstack#36168)
  Remove unclosed backticks in walkthrough doc (saltstack#36170)
  fixed whitespace lint issues
  Added documentation and cleaned up some linting issues.
  Back-port saltstack#36067 to carbon (saltstack#36159)
  Use string.ascii_lowercase (saltstack#36163)
  Fixing unit tests for develop (saltstack#36141)
  Adds saltstack#36055 to release notes
  Pylint fix for saltstack#36072 (saltstack#36155)
  INFRA-3943 - Bug fix - too many volumes getting tagged (saltstack#36072)
  Remove unclosed backticks in walkthrough doc (saltstack#36154)
  Fix issue with cp.push (saltstack#36136)
  Document `owner` kwarg for `postgres_schema.present` state function (saltstack#36147)
  Ignore states that do not have a numeric jid, i.e. 'req'
  Fixed _interfaces_ifconfig output for SunOS test
  Fix tests that assert CommandExecutionError (saltstack#32485)
  Fix tests (saltstack#35693)
  Skip utils_test if timelib is not installed (saltstack#32699)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants