test_remakemisagochecksums.py 542 B

12345678910111213141516
  1. from django.core.management import call_command
  2. from django.test import TestCase
  3. from django.utils.six import StringIO
  4. from ..management.commands import remakemisagochecksums
  5. class RemakeMisagoChecksumsTests(TestCase):
  6. def test_remake_checksums(self):
  7. """command raises no errors"""
  8. command = remakemisagochecksums.Command()
  9. out = StringIO()
  10. call_command(command, "--force", stdout=out)
  11. command_output = out.getvalue().splitlines()[-1].strip()
  12. self.assertEqual(command_output, "Done!")