mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-15 03:39:46 +08:00
Get tests of the retry decorator working in the test suite.
This commit is contained in:
@@ -113,7 +113,7 @@ class TestConfiguration(BaseConfiguration):
|
||||
DEBUG = True
|
||||
|
||||
# Global network-related values, in seconds
|
||||
NET_TIMEOUT = 5
|
||||
NET_TIMEOUT = 3
|
||||
NET_RETRY_INTERVAL = 1
|
||||
|
||||
KOJI_PROFILE = 'staging'
|
||||
|
||||
@@ -54,7 +54,9 @@ app = Flask(__name__)
|
||||
app.config.from_envvar("RIDA_SETTINGS", silent=True)
|
||||
|
||||
here = sys.path[0]
|
||||
if here not in ('/usr/bin', '/bin', '/usr/local/bin'):
|
||||
if any(['nosetests' in arg for arg in sys.argv]):
|
||||
app.config.from_object('config.TestConfiguration')
|
||||
elif here not in ('/usr/bin', '/bin', '/usr/local/bin'):
|
||||
app.config.from_object('config.DevConfiguration')
|
||||
else:
|
||||
app.config.from_object('config.ProdConfiguration')
|
||||
|
||||
@@ -70,7 +70,7 @@ class TestKojiBuilder(unittest.TestCase):
|
||||
|
||||
with self.assertRaises(IOError):
|
||||
fake_kmb.buildroot_ready()
|
||||
self.assertEquals(mocked_kojiutil.checkForBuilds.call_count, 5)
|
||||
self.assertEquals(mocked_kojiutil.checkForBuilds.call_count, 3)
|
||||
|
||||
|
||||
class FakeKojiModuleBuilder(KojiModuleBuilder):
|
||||
|
||||
Reference in New Issue
Block a user