def test_apt_update_nonfatal(self, call):
     fetch.apt_update()
     call.assert_called_with(['apt-get', 'update'], env={})
Beispiel #2
0
 def test_status_statuscmd_fail(self, log, call):
     call.side_effect = OSError(3, 'fail')
     self.assertRaises(OSError, hookenv.status_set, 'active', 'msg')
     call.assert_called_with(['status-set', 'active', 'msg'])
 def test_apt_update_nonfatal(self, call):
     fetch.apt_update()
     call.assert_called_with(['apt-get', 'update'],
                             env=getenv(
                                 {'DEBIAN_FRONTEND': 'noninteractive'}))
Beispiel #4
0
 def test_status(self, call):
     call.return_value = 0
     hookenv.status_set('active', 'Everything is Awesome!')
     call.assert_called_with(
         ['status-set', 'active', 'Everything is Awesome!'])