Skip to content

Commit

Permalink
Add test to make sure management command calling works at the most ba…
Browse files Browse the repository at this point in the history
…sic level
  • Loading branch information
ara818 committed Sep 26, 2019
1 parent b89022d commit 9e6c4ad
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*.pyc
.idea/
!.gitignore
.vscode/
.DS_Store

!.gitignore
14 changes: 14 additions & 0 deletions test_project/test_app/tests/test_management_command.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from django.core.management import call_command
from django.test import TestCase


class ManagementCommandTestCase(TestCase):

def test_autocompleter_init_calleable(self):
"""
Can call autocompleter_init without any error
"""
try:
call_command("autocompleter_init")
except Exception:
self.fail("Calling autocompleter_init has raised an exception unexpectedly")

0 comments on commit 9e6c4ad

Please sign in to comment.