Commit cb700a2b authored by Mark Hewitt's avatar Mark Hewitt
Browse files

Fix broken test case

parent 09862926
Pipeline #76529 passed with stages
in 3 minutes and 51 seconds
......@@ -32,6 +32,7 @@ Change Log
------
- test against python 3.10 in addition to 3.8, 3.9
- crs commands
0.0.24
------
......
......@@ -12,4 +12,4 @@
""" OSDU command line environment"""
__VERSION__ = "0.0.24"
__VERSION__ = "0.0.25"
......@@ -22,9 +22,9 @@ from osducli.config import CONFIG_CRS_CATALOG_URL
# click entry point
@click.command(cls=CustomClickCommand)
@handle_cli_exceptions
@command_with_output()
@command_with_output("attributes.{Name:name,Description:description,LastModified:lastModified}")
def _click_command(state: State):
"""CRS Summary"""
"""CRS catalog Summary"""
return crs_summary(state)
......@@ -35,5 +35,5 @@ def crs_summary(state: State):
state (State): Global state
"""
connection = CliOsduClient(state.config)
json = connection.cli_get_returning_json(CONFIG_CRS_CATALOG_URL, "catalog/attributes")
json = connection.cli_get_returning_json(CONFIG_CRS_CATALOG_URL, "catalog")
return json
......@@ -43,7 +43,7 @@ class ServiceInfoTests(unittest.TestCase):
CRS_CATALOG_SWAGGER_PATH,
CRS_CATALOG_DOCUMENTATION,
)
self.assertTrue(result.exit_code, 0)
self.assertEqual(result.exit_code, 0)
if __name__ == "__main__":
......
......@@ -93,7 +93,7 @@ class HelpTextTests(unittest.TestCase):
# make sure there is descriptive text in this line by checking
# that the line is longer than just the command.
self.assertGreater(
len(line.replace(first_word_of_line, "").lstrip()),
len(line.replace(first_word_of_line, "", 1).lstrip()),
len(first_word_of_line),
msg='Missing help text in "Commands" on line: ' + line,
)
......@@ -379,6 +379,7 @@ class HelpTextTests(unittest.TestCase):
"osdu",
subgroups=(
"config",
"crs",
"dataload",
"entitlements",
"legal",
......@@ -403,6 +404,16 @@ class HelpTextTests(unittest.TestCase):
),
)
self.validate_output(
"osdu crs",
commands=(
"areas",
"info",
"list",
"summary",
),
)
self.validate_output(
"osdu dataload",
commands=(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment