Add a basic test for the creatersakey management command
This commit is contained in:
parent
aa51ab36ad
commit
36f8bcbb5d
1 changed files with 11 additions and 0 deletions
11
oidc_provider/tests/test_creatersakey_command.py
Normal file
11
oidc_provider/tests/test_creatersakey_command.py
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
from django.core.management import call_command
|
||||||
|
from django.test import TestCase, override_settings
|
||||||
|
from django.utils.six import StringIO
|
||||||
|
|
||||||
|
|
||||||
|
class CreateRSAKeyTest(TestCase):
|
||||||
|
@override_settings(BASE_DIR='/tmp')
|
||||||
|
def test_command_output(self):
|
||||||
|
out = StringIO()
|
||||||
|
call_command('creatersakey', stdout=out)
|
||||||
|
self.assertIn('RSA key successfully created', out.getvalue())
|
Loading…
Reference in a new issue