Include a newline on the debug generated graph visualization

fix some import bugs and clear some whitespace from the command test
This commit is contained in:
Matthew Jones 2014-03-12 16:32:21 -04:00
parent fbafa22a5a
commit c0382f78bb
4 changed files with 4 additions and 2 deletions

View File

@ -72,7 +72,7 @@ class SimpleDAG(object):
for from_node, to_node in self.edges:
doc += "%s -> %s;\n" % (short_string_obj(self.nodes[from_node]['node_object']),
short_string_obj(self.nodes[to_node]['node_object']))
doc += "}"
doc += "}\n"
gv_file = open('/tmp/graph.gv', 'w')
gv_file.write(doc)
gv_file.close()

View File

@ -31,6 +31,7 @@ from django.utils.timezone import now, make_aware, get_default_timezone
# AWX
from awx.main.fields import AutoOneToOneField
from awx.main.models.base import *
from awx.main.utils import encrypt_field
__all__ = ['Inventory', 'Host', 'Group', 'InventorySource', 'InventoryUpdate']

View File

@ -33,6 +33,7 @@ from django.utils.timezone import now, make_aware, get_default_timezone
from awx.lib.compat import slugify
from awx.main.models.base import *
from awx.main.utils import update_scm_url
from awx.main.utils import encrypt_field
__all__ = ['Project', 'ProjectUpdate']

View File

@ -395,7 +395,7 @@ class CleanupJobsTest(BaseCommandMixin, BaseLiveServerTest):
result, stdout, stderr = self.run_command('cleanup_jobs')
self.assertEqual(result, None)
jobs_after = Job.objects.all().count()
self.assertEqual(jobs_before, jobs_after)
self.assertEqual(jobs_before, jobs_after)
# Create and run job.
self.create_test_project(TEST_PLAYBOOK)
job_template = self.create_test_job_template()