Exemple #1
0
 def test_exp_by_states(self):
     """ Run the 'exp_by_states' function """
     api = my_mock.api_mock({"items": [{'state': 'Waiting', 'id': 10134},
                                       {'state': 'Waiting', 'id': 10135},
                                       {'state': 'Running', 'id': 10130}]})
     states_d = helpers.exps_by_states_dict(api, helpers.ACTIVE_STATES)
     self.assertEqual(
         {'Waiting': [10134, 10135], 'Running': [10130]}, states_d)
     my_mock.api_mock_stop()
Exemple #2
0
 def test_exp_by_states(self):
     """ Run the 'exp_by_states' function """
     api = my_mock.api_mock({"items": [{'state': 'Waiting', 'id': 10134},
                                       {'state': 'Waiting', 'id': 10135},
                                       {'state': 'Running', 'id': 10130}]})
     states_d = helpers.exps_by_states_dict(api, helpers.ACTIVE_STATES)
     self.assertEqual(
         {'Waiting': [10134, 10135], 'Running': [10130]}, states_d)
     my_mock.api_mock_stop()
Exemple #3
0
 def tearDown(self):
     my_mock.api_mock_stop()
 def tearDown(self):
     api_mock_stop()
 def tearDown(self):
     api_mock_stop()