Beispiel #1
0
 def test_validate_task_no_tasks(self):
     result = run.validate_tasks({})
     assert result == []
Beispiel #2
0
 def test_validate_tasks_valid(self):
     expected = {"foo": "bar"}
     result = run.validate_tasks({"tasks": expected})
     assert result == expected
Beispiel #3
0
 def test_validate_tasks_invalid(self):
     config = {"tasks": {"kernel": "can't be here"}}
     with pytest.raises(AssertionError):
         run.validate_tasks(config)
Beispiel #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")
Beispiel #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")
Beispiel #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")
Beispiel #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")