fix flakieness in create wake on lan test

This commit is contained in:
Daniel A. Wozniak 2019-01-08 13:36:03 -07:00
parent ff80d537ab
commit 23b2c3ed7c
No known key found for this signature in database
GPG key ID: 166B9D2C06C82D61

View file

@ -112,7 +112,9 @@ class SaltifyTestCase(TestCase, LoaderModuleMockMixin):
result = saltify.create(vm_)
mock_cmd.assert_called_once_with(vm_, ANY)
mm_cmd.assert_called_with('friend1', 'network.wol', ['aa-bb-cc-dd-ee-ff'])
mock_sleep.assert_called_with(0.01)
# The test suite might call time.sleep, look for any call
# that has the expected wait time.
mock_sleep.assert_any_call(0.01)
self.assertTrue(result)
def test_avail_locations(self):