django-oidc-provider/oidc_provider/tests/cases/test_commands.py
Juan Ignacio Fiorentino d519e49acb Simplify test suit.
2018-03-22 11:45:56 -03:00

16 lines
540 B
Python

from django.core.management import call_command
from django.test import TestCase
from django.utils.six import StringIO
class CommandsTest(TestCase):
def test_creatersakey_output(self):
out = StringIO()
call_command('creatersakey', stdout=out)
self.assertIn('RSA key successfully created', out.getvalue())
def test_makemigrations_output(self):
out = StringIO()
call_command('makemigrations', 'oidc_provider', stdout=out)
self.assertIn('No changes detected in app', out.getvalue())