Ejemplo n.º 1
0
 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"
Ejemplo n.º 2
0
 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"
Ejemplo n.º 3
0
 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"
Ejemplo n.º 4
0
 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"