Skip to content

Commit

Permalink
Merge 8f7ceea into a3612e5
Browse files Browse the repository at this point in the history
  • Loading branch information
R2ZER0 committed Nov 30, 2023
2 parents a3612e5 + 8f7ceea commit 1c04b88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions datastore/db/management/commands/list_datagetter_runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ def add_arguments(self, parser):

def handle(self, *args, **options):
if options.get("total"):
print("%s" % GetterRun.objects.count(), file=self.stdout)
self.stdout.write("%s" % GetterRun.objects.count())
return

print("id | datetime")
self.stdout.write("id | datetime | in_use")
for run in GetterRun.objects.all():
print("%s | %s" % (run.pk, str(run)), file=self.stdout)
self.stdout.write(
"{:<3} | {} | {}".format(run.pk, run.datetime, run.is_in_use())
)
2 changes: 1 addition & 1 deletion datastore/tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def test_list_datagetter_runs(self):
out = StringIO()
err_out = StringIO()
call_command("list_datagetter_runs", stdout=out, stderr=err_out)
self.assertIn("1 |", out.getvalue())
self.assertIn("1 |", out.getvalue())
self.assertEqual(len(err_out.getvalue()), 0, "Errors output by command")

def test_set_status(self):
Expand Down

0 comments on commit 1c04b88

Please sign in to comment.