Exemple #1
0
 def test_units_with_wl_status_state(self):
     self._application_states_setup({
         'workload-status': 'active',
         'workload-status-message': 'Unit is ready'})
     units = model.units_with_wl_status_state(self.Model_mock, 'active')
     self.assertTrue(len(units) == 2)
     self.assertIn(self.unit1, units)
     self.assertIn(self.unit2, units)
Exemple #2
0
 def test_units_with_wl_status_state_no_match(self):
     self._application_states_setup({
         'workload-status':
         'blocked',
         'workload-status-message':
         'Unit is ready'
     })
     units = model.units_with_wl_status_state(self.Model_mock, 'active')
     self.assertTrue(len(units) == 0)