runboat/tests/test_settings.py
2021-11-21 19:10:32 +01:00

14 lines
560 B
Python

import pytest
from runboat.exceptions import RepoOrBranchNotSupported
from runboat.settings import BuildSettings, settings
def test_get_build_settings() -> None:
assert settings.get_build_settings("OCA/mis-builder", "15.0") == [
BuildSettings(image="ghcr.io/oca/oca-ci/py3.8-odoo15.0:latest")
]
with pytest.raises(RepoOrBranchNotSupported):
settings.get_build_settings("acsone/mis-builder", "15.0")
with pytest.raises(RepoOrBranchNotSupported):
assert not settings.get_build_settings("OCA/mis-builder", "15.0-stuff")