def read_test(self): conf = AnacondaConfiguration() with tempfile.NamedTemporaryFile("w") as f: conf.read(f.name) self.assertEqual(len(conf.get_sources()), 1) self.assertEqual(conf.get_sources()[0], f.name)
def test_read(self): conf = AnacondaConfiguration() with tempfile.NamedTemporaryFile("w") as f: conf.read(f.name) assert len(conf.get_sources()) == 1 assert conf.get_sources()[0] == f.name