from app_new.version import get_version


def test_project_version_is_available(monkeypatch):
    monkeypatch.delenv('GMAO_VERSION', raising=False)
    assert get_version() == '0.2.0-dev.2'


def test_environment_version_takes_precedence(monkeypatch):
    monkeypatch.setenv('GMAO_VERSION', '9.8.7-test.1')
    assert get_version() == '9.8.7-test.1'
