forked from translate/pootle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dfa0326
commit 7e6deea
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) Pootle contributors. | ||
# | ||
# This file is a part of the Pootle project. It is distributed under the GPL3 | ||
# or later license. See the LICENSE file for a copy of the license and the | ||
# AUTHORS file for copyright and authorship information. | ||
|
||
import pytest | ||
|
||
from django.core.management import call_command, get_commands | ||
|
||
|
||
@pytest.mark.cmd | ||
@pytest.mark.parametrize("command,app", [ | ||
(command, app) | ||
for command, app in get_commands().iteritems() | ||
if not app.startswith("django") | ||
]) | ||
def test_initdb_help(capfd, command, app): | ||
"""Catch any simple command issues""" | ||
print("Command: %s, App: %s" % (command, app)) | ||
with pytest.raises(SystemExit): | ||
call_command(command, '--help') | ||
out, err = capfd.readouterr() | ||
assert '--help' in out |