1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
import os
import unittest
from awscli.clidocs import (
GLOBAL_OPTIONS_FILE,
GLOBAL_OPTIONS_SYNOPSIS_FILE,
GlobalOptionsDocumenter,
)
from awscli.testutils import create_clidriver
class TestGlobalOptionsDocumenter(unittest.TestCase):
def setUp(self):
self.driver = create_clidriver()
self.help_command = self.driver.create_help_command()
self.globals = GlobalOptionsDocumenter(self.help_command)
def test_doc_global_options_match_saved_content(self):
with open(GLOBAL_OPTIONS_FILE) as f:
self.assertEqual(self.globals.doc_global_options(), f.read())
def test_doc_global_synopsis_match_saved_content(self):
with open(GLOBAL_OPTIONS_SYNOPSIS_FILE) as f:
self.assertEqual(self.globals.doc_global_synopsis(), f.read())
|