Call get_schema(), rather than sub-method in schema tests.

This commit is contained in:
Carlton Gibson 2020-01-08 20:42:59 +01:00 committed by Carlton Gibson
parent d0b9577605
commit 3b88312c33

View File

@ -659,7 +659,7 @@ class TestGenerator(TestCase):
generator = SchemaGenerator(patterns=patterns) generator = SchemaGenerator(patterns=patterns)
generator._initialise_endpoints() generator._initialise_endpoints()
paths = generator.get_paths() paths = generator.get_schema()["paths"]
assert '/example/' in paths assert '/example/' in paths
example_operations = paths['/example/'] example_operations = paths['/example/']
@ -676,7 +676,7 @@ class TestGenerator(TestCase):
generator = SchemaGenerator(patterns=patterns) generator = SchemaGenerator(patterns=patterns)
generator._initialise_endpoints() generator._initialise_endpoints()
paths = generator.get_paths() paths = generator.get_schema()["paths"]
assert '/v1/example/' in paths assert '/v1/example/' in paths
assert '/v1/example/{id}/' in paths assert '/v1/example/{id}/' in paths
@ -689,7 +689,7 @@ class TestGenerator(TestCase):
generator = SchemaGenerator(patterns=patterns, url='/api') generator = SchemaGenerator(patterns=patterns, url='/api')
generator._initialise_endpoints() generator._initialise_endpoints()
paths = generator.get_paths() paths = generator.get_schema()["paths"]
assert '/api/example/' in paths assert '/api/example/' in paths
assert '/api/example/{id}/' in paths assert '/api/example/{id}/' in paths