import unittest import xml.etree.ElementTree as ET from lib.db import DB from lib.history import History from lib.obs import OBS from lib.obs_revision import OBSRevision class TestDBMethods(unittest.TestCase): def setUp(self): self.db = DB(section="test") self.obs = OBS() self.history = History(self.obs, "xz") def test_import(self): test_rev = OBSRevision(self.obs, self.history, "openSUSE:Factory", "xz") test_rev.parse( ET.fromstring( """ 37a33785d29ac57cdd5f2cbd7b0d6588 5.2.7 RBrownFactory 1008136 """ ) ) self.db.import_rev(test_rev) if __name__ == "__main__": unittest.main()