def dummy_repository_base(repository=None): if repository is None: repository = HacsRepository() repository.hacs.hass = HomeAssistant() repository.hacs.hass.data = {"custom_components": []} repository.logger = Logger("hacs.test.test") repository.information.name = "test" repository.information.full_name = "test/test" repository.versions.available = "3" repository.status.selected_tag = "3" repository.ref = version_to_install(repository) repository.manifest = {"config_flow": False, "domain": "test"} repository.releases.published_tags = ["1", "2", "3"] repository.data = RepositoryData().create_from_dict(repository_data) return repository
def __init__(self): """Set up HacsRepository.""" self.hacs = get_hacs() self.data = RepositoryData() self.content = RepositoryContent() self.content.path = RepositoryPath() self.information = RepositoryInformation() self.repository_object = None self.status = RepositoryStatus() self.state = None self.manifest = {} self.repository_manifest = HacsManifest.from_dict({}) self.validate = Validate() self.releases = RepositoryReleases() self.versions = RepositoryVersions() self.pending_restart = False self.tree = [] self.treefiles = [] self.ref = None