Esempio n. 1
0
 def test_create_instance(self, monkeypatch):
     plug = module.ImportPlugin(tdb, tdenv)
     assert module.UPGRADES == "modules.json"
     assert os.path.join('data', 'eddb') in str(plug.dataPath)
     
     monkeypatch.setitem(os.environ, 'TD_EDDB', '/my/testdir')
     plug = module.ImportPlugin(tdb, tdenv)
     assert os.path.join('my', 'testdir') in str(plug.dataPath)
Esempio n. 2
0
 def test_upgrades(self, capsys, td):
     tdb, tdenv = td
     plug = module.ImportPlugin(tdb, tdenv)
     assert module.UPGRADES == "modules.json"
     assert os.path.join('data', 'eddb') in str(plug.dataPath)
     plug.downloadFile(module.UPGRADES, plug.upgradesPath)
     assert (plug.dataPath / plug.upgradesPath).is_file()