def test_05ClearSingle(self): s = Sources(name="demo00", url="") s.add() res0 = s.findAllByName() res0[0].clearSingle() res1 = s.findAllByName() if len(res1) == 0: assert True else: assert False
def test_runMigrations(self): d = InitDb() d.runMigrations() s = Sources(name="test", url="www.python.com") s.add() res = s.findAllByName() assert len(res) == 1
def test_05clearTable(self): Sources().clearTable() s = Sources(name="Sources01") res = s.findAllByName() if len(res) == 0: assert True else: assert False
def test_01add01(self): s = Sources(name="", url="void") s.add() res = s.findAllByName() if res[0].name == "" and res[0].url == "void": s.clearTable() assert True else: assert False