Finish ad hoc command unit tests.

This commit is contained in:
Chris Church
2015-04-05 18:31:51 -04:00
parent 0fdb9703ea
commit e2a6f100e1
8 changed files with 563 additions and 134 deletions

View File

@@ -207,7 +207,7 @@ class AdHocCommand(UnifiedJob):
def save(self, *args, **kwargs):
update_fields = kwargs.get('update_fields', [])
if not self.name:
self.name = Truncator(u'%s: %s' % (self.module_name, self.module_args)).chars(512)
self.name = Truncator(u': '.join(filter(None, (self.module_name, self.module_args)))).chars(512)
if 'name' not in update_fields:
update_fields.append('name')
super(AdHocCommand, self).save(*args, **kwargs)