Get tests of the retry decorator working in the test suite.

This commit is contained in:
Ralph Bean
2016-11-18 10:19:41 -05:00
parent c65cf0ab7f
commit d83f210297
3 changed files with 5 additions and 3 deletions

View File

@@ -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'

View File

@@ -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')

View File

@@ -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):