Exemplo n.º 1
0
 def test_loads_yamls_if_HABITAT(self, mock_other_stuff, mock_load_service_yamls):
     runs_on = "FAKE_HABITAT1"
     autosuggest.suggest_runs_on(runs_on)
     assert 1 == mock_load_service_yamls.call_count
Exemplo n.º 2
0
 def test_does_not_load_yamls_if_no_munging_occurred(self, mock_load_service_yamls):
     runs_on = "things,not,needing,munging"
     autosuggest.suggest_runs_on(runs_on)
     assert 0 == mock_load_service_yamls.call_count
Exemplo n.º 3
0
 def test_loads_yamls_if_auto(self, mock_other_stuff, mock_load_service_yamls):
     runs_on = "AUTO"
     autosuggest.suggest_runs_on(runs_on)
     assert 1 == mock_load_service_yamls.call_count
Exemplo n.º 4
0
 def test_returns_original_if_no_munging_occurred(self, mock_other_stuff):
     expected = "things,not,needing,munging"
     actual = autosuggest.suggest_runs_on(expected)
     assert expected == actual