Store API URL in the revision table
Will be important once we get into SLE
This commit is contained in:
@@ -6,11 +6,14 @@ from lib.db_revision import DBRevision
|
||||
from lib.obs import OBS
|
||||
from lib.obs_revision import OBSRevision
|
||||
|
||||
# needs to exist in local oscrc (little tricky)
|
||||
API_URL = "https://api.opensuse.org"
|
||||
|
||||
|
||||
class TestDBMethods(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.db = DB(section="test")
|
||||
self.obs = OBS()
|
||||
self.obs = OBS(API_URL)
|
||||
|
||||
def test_import(self):
|
||||
test_rev = OBSRevision(self.obs, "openSUSE:Factory", "xz")
|
||||
@@ -30,6 +33,7 @@ class TestDBMethods(unittest.TestCase):
|
||||
db_rev = DBRevision.fetch_revision(
|
||||
self.db, project="openSUSE:Factory", package="xz", rev="70"
|
||||
)
|
||||
self.assertEqual(db_rev.api_url, API_URL)
|
||||
self.assertEqual(str(test_rev), str(db_rev))
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user