def test_load_codes(self): """Kira should ignore invalid codes.""" code_path = os.path.join(self.work_dir, "codes.yaml") with open(code_path, "w") as code_file: code_file.write(KIRA_CODES) res = kira.load_codes(code_path) assert len(res) == 1, "Expected exactly 1 valid Kira code"
def test_load_codes(self): """Kira should ignore invalid codes.""" code_path = os.path.join(self.work_dir, 'codes.yaml') with open(code_path, 'w') as code_file: code_file.write(KIRA_CODES) res = kira.load_codes(code_path) assert len(res) == 1, "Expected exactly 1 valid Kira code"
def test_kira_creates_codes(self): """Kira module should create codes file if missing.""" code_path = os.path.join(self.work_dir, "codes.yaml") kira.load_codes(code_path) assert os.path.exists( code_path), "Kira component didn't create codes file"
def test_kira_creates_codes(self): """Kira module should create codes file if missing.""" code_path = os.path.join(self.work_dir, 'codes.yaml') kira.load_codes(code_path) assert os.path.exists(code_path), \ "Kira component didn't create codes file"