File diff 3ea40b1330b7 → 3c69231d7781
functional_tests/test_server.py
Show inline comments
 
@@ -15,12 +15,13 @@
 
# details.
 
#
 
# You should have received a copy of the GNU General Public License along with
 
# Gimmecert.  If not, see <http://www.gnu.org/licenses/>.
 
#
 

	
 
import sys
 

	
 
from .base import run_command
 

	
 

	
 
def test_server_command_available_with_help():
 
    # John has finally finished initialising his CA hierarchy. What he
 
@@ -39,13 +40,18 @@ def test_server_command_available_with_help():
 

	
 
    # John can see that the command accepts an entity name, and an
 
    # optional list of DNS subject alternative names.
 
    assert exit_code == 0
 
    assert stderr == ""
 
    assert stdout.startswith("usage: gimmecert server")
 
    assert " entity_name [dns_name [dns_name ...]]" in stdout
 
    # Help output for nargs="*" got changed in Python 3.9. See
 
    # https://bugs.python.org/issue38438 for details.
 
    if sys.version_info.major == 3 and sys.version_info.minor < 9:
 
        assert " entity_name [dns_name [dns_name ...]]" in stdout
 
    else:
 
        assert " entity_name [dns_name ...]" in stdout
 

	
 

	
 
def test_server_command_requires_initialised_hierarchy(tmpdir):
 
    # John is about to issue a server certificate. He switches to his
 
    # project directory.
 
    tmpdir.chdir()