Beispiel #1
0
 def test_get_img_file_exists(self, fs):
     img_contents = """ data:
     - CentOS 6.9
     - Debian 9
     """
     img_file = "/tmp/.images.yml"
     fs.create_file(img_file, contents=img_contents)
     if os.name != "nt":
         assert lambdafunc.get_img() == ["CentOS 6.9", "Debian 9"]
Beispiel #2
0
 def test_get_img_file_exists(self, fs):
     img_contents = """ data:
     - CentOS 6.9
     - Debian 9
     """
     temp = utils.tmp_dir()
     img_file = os.path.join(temp, "images.yml")
     fs.create_file(img_file, contents=img_contents)
     if os.name != "nt":
         assert lambdafunc.get_img() == ["CentOS 6.9", "Debian 9"]
Beispiel #3
0
 def test_get_img(self):
     assert 'Ubuntu' in str(lambdafunc.get_img())
Beispiel #4
0
 def test_get_img_no_file(self, monkeypatch):
     monkeypatch.setattr(neo.libs.image, "get_list", self.fake_get_img_list)
     if os.name != "nt":
         assert lambdafunc.get_img() == ["Fedora 26", "Fedora 25"]