2022-06-26 02:16:51 +02:00
|
|
|
from repo_cloner.lib.default_cloner_config import DefaultClonerConfig
|
|
|
|
|
|
|
|
|
|
|
|
def test_init():
|
|
|
|
x = DefaultClonerConfig()
|
|
|
|
assert isinstance(x, DefaultClonerConfig)
|
|
|
|
|
|
|
|
|
|
|
|
def test_types():
|
|
|
|
x = DefaultClonerConfig()
|
|
|
|
assert isinstance(x.cloner_project_name, str)
|
|
|
|
assert isinstance(x.cloner_repo_url, str)
|
|
|
|
assert isinstance(x.cloner_interval, int)
|
|
|
|
assert isinstance(x.cloner_submodules, bool)
|
|
|
|
assert isinstance(x.cloner_submodule_depth, int)
|
|
|
|
assert isinstance(x.has_property("wut"), bool)
|
|
|
|
|
|
|
|
|
|
|
|
def test_values():
|
|
|
|
x = DefaultClonerConfig()
|
|
|
|
assert x.cloner_project_name == ""
|
|
|
|
assert x.cloner_repo_url == ""
|
2022-07-24 22:47:13 +02:00
|
|
|
assert x.cloner_interval == 0
|
2022-06-26 02:16:51 +02:00
|
|
|
assert x.cloner_submodules
|
2022-08-06 02:10:48 +02:00
|
|
|
assert x.cloner_submodule_depth == 0
|
2022-06-26 02:16:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
def test_has_property():
|
|
|
|
x = DefaultClonerConfig()
|
|
|
|
assert not x.has_property("nonexistent")
|
|
|
|
assert x.has_property("cloner_project_name")
|
|
|
|
assert x.has_property("cloner_repo_url")
|
|
|
|
assert x.has_property("cloner_interval")
|
|
|
|
assert x.has_property("cloner_submodules")
|
|
|
|
assert x.has_property("cloner_submodule_depth")
|