This commit is contained in:
Alexey Lavrenuke (load testing) 2014-02-20 18:45:32 +04:00
parent fec8a0ebc6
commit 76a3084f12

View File

@ -134,12 +134,25 @@ class StepperTestCase(TankTestCase):
rps_schedule=[],
instances_schedule=[],
loop_limit=-1,
ammo_limit=100,
ammo_limit=10,
ammo_type='access',
headers=[],
ammo_file="data/access1.log",
).write(stpd_file)
res = open(temp_stpd, 'r').read()
# TODO: enable asserts after fixing the exception
#self.assertNotEquals("", res)
#self.assertEquals(126, os.path.getsize(temp_stpd))
self.assertNotEquals("", res)
self.assertEquals(1459, os.path.getsize(temp_stpd))
def test_empty_uri(self):
from Tank.stepper.module_exceptions import AmmoFileError
temp_stpd = tempfile.mkstemp()[1]
with open(temp_stpd, 'w') as stpd_file:
Stepper(
rps_schedule=[],
instances_schedule=[],
loop_limit=-1,
ammo_limit=10,
headers=[],
ammo_file="data/empty.uri",
).write(stpd_file)
self.assertRaises(AmmoFileError)