Exemplo n.º 1
0
 def test_validate_task_no_tasks(self):
     result = run.validate_tasks({})
     assert result == []
Exemplo n.º 2
0
 def test_validate_tasks_valid(self):
     expected = {"foo": "bar"}
     result = run.validate_tasks({"tasks": expected})
     assert result == expected
Exemplo n.º 3
0
 def test_validate_tasks_invalid(self):
     config = {"tasks": {"kernel": "can't be here"}}
     with pytest.raises(AssertionError):
         run.validate_tasks(config)
Exemplo n.º 4
0
 def test_validate_tasks_is_list(self):
     with pytest.raises(AssertionError) as excinfo:
         run.validate_tasks({"tasks": {"foo": "bar"}})
     assert excinfo.value.message.startswith("Expected list")
Exemplo n.º 5
0
 def test_validate_tasks_invalid(self):
     config = {"tasks": [{"kernel": "can't be here"}]}
     with pytest.raises(AssertionError) as excinfo:
         run.validate_tasks(config)
     assert excinfo.value.message.startswith("kernel installation")
Exemplo n.º 6
0
 def test_validate_tasks_is_list(self):
     with pytest.raises(AssertionError) as excinfo:
         run.validate_tasks({"tasks": {"foo": "bar"}})
     assert excinfo.value.message.startswith("Expected list")
Exemplo n.º 7
0
 def test_validate_tasks_invalid(self):
     config = {"tasks": [{"kernel": "can't be here"}]}
     with pytest.raises(AssertionError) as excinfo:
         run.validate_tasks(config)
     assert excinfo.value.message.startswith("kernel installation")