mark license expired inventory update + tests

This commit is contained in:
Chris Meyers
2015-05-04 12:51:38 -04:00
parent cffb2f324f
commit f6541059a3
3 changed files with 27 additions and 3 deletions

View File

@@ -177,12 +177,12 @@ class BaseTestMixin(QueueTestMixin):
rnd_str = '____' + str(random.randint(1, 9999999))
return __name__ + '-generated-' + string + rnd_str
def create_test_license_file(self, instance_count=10000):
def create_test_license_file(self, instance_count=10000, license_date=int(time.time() + 3600)):
writer = LicenseWriter(
company_name='AWX',
contact_name='AWX Admin',
contact_email='awx@example.com',
license_date=int(time.time() + 3600),
license_date=license_date,
instance_count=instance_count)
handle, license_path = tempfile.mkstemp(suffix='.json')
os.close(handle)