with open(check_file, "w"):
pass
hass = get_test_home_assistant()
hass.config.config_dir = config_dir
self.assertTrue(os.path.isfile(check_file))
bootstrap.process_ha_config_upgrade(hass)
self.assertFalse(os.path.isfile(check_file))
hass.stop()
def test_not_remove_lib_if_not_upgrade(self):
Test removal of library with no upgrade.
with tempfile.TemporaryDirectory() as config_dir:
After Change
assert os.path.isfile(check_file)
bootstrap.process_ha_config_upgrade(self.hass)
assert not os.path.isfile(check_file)
def test_not_remove_lib_if_not_upgrade(self):
Test removal of library with no upgrade.
with tempfile.TemporaryDirectory() as config_dir: