forked from aws/aws-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_globals.py
More file actions
23 lines (18 loc) · 812 Bytes
/
test_globals.py
File metadata and controls
23 lines (18 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
import unittest
from awscli.testutils import create_clidriver
from awscli.clidocs import (
GLOBAL_OPTIONS_FILE, GLOBAL_OPTIONS_SYNOPSIS_FILE,
GlobalOptionsDocumenter
)
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, 'r') 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, 'r') as f:
self.assertEqual(self.globals.doc_global_synopsis(), f.read())