MCPcopy Create free account
hub / github.com/aws/aws-cli / test_iso

Method test_iso

tests/functional/test_timeformat.py:42–57  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

40 self.files.remove_all()
41
42 def test_iso(self):
43 self.environ['AWS_CONFIG_FILE'] = self.files.create_file(
44 'iso', '[default]\ncli_timestamp_format = iso8601\n'
45 )
46 self.driver = create_clidriver()
47 self.entry_point = AWSCLIEntryPoint(self.driver)
48 expected_time = (
49 datetime.datetime.fromtimestamp(0)
50 .replace(tzinfo=tzlocal())
51 .isoformat()
52 )
53
54 stdout, _, _ = self.run_cmd(self.command)
55 json_response = json.loads(stdout)
56 start_time = json_response["builds"][0]["startTime"]
57 self.assertEqual(expected_time, start_time)
58
59 def test_none(self):
60 self.environ['AWS_CONFIG_FILE'] = self.files.create_file(

Callers

nothing calls this directly

Calls 5

create_clidriverFunction · 0.90
AWSCLIEntryPointClass · 0.90
fromtimestampMethod · 0.80
create_fileMethod · 0.45
run_cmdMethod · 0.45

Tested by

no test coverage detected