Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit a0d2776

Browse files
authored
Refactors test file generation (#269)
* CHanges java client template name * sets default templating engine to hbs * Adds java config file for sample gen * Refactoring to fold test file generation into a new data store * Fixes path test file names, adds test prefix * Samples regen * Reverts two files * Reverted java template changes * Removes unused folders * Fixes java tests * Adds java code to detect if test file already exists * Sample regen
1 parent 16a31d3 commit a0d2776

File tree

1,299 files changed

+1416
-2226
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,299 files changed

+1416
-2226
lines changed

samples/client/3_0_3_unit_test/python/.openapi-generator/FILES

Lines changed: 0 additions & 522 deletions
Large diffs are not rendered by default.

samples/client/3_0_3_unit_test/python/test/components/schema/test__not.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616

1717
class Test_Not(unittest.TestCase):
1818
"""_Not unit test stubs"""
19-
configuration = schema_configuration.SchemaConfiguration()
19+
configuration = schema_configuration.SchemaConfiguration(
20+
disabled_json_schema_keywords={'format'}
21+
)
2022

2123
def test_allowed_passes(self):
2224
# allowed

samples/client/3_0_3_unit_test/python/test/components/schema/test_additionalproperties_allows_a_schema_which_should_validate.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616

1717
class TestAdditionalpropertiesAllowsASchemaWhichShouldValidate(unittest.TestCase):
1818
"""AdditionalpropertiesAllowsASchemaWhichShouldValidate unit test stubs"""
19-
configuration = schema_configuration.SchemaConfiguration()
19+
configuration = schema_configuration.SchemaConfiguration(
20+
disabled_json_schema_keywords={'format'}
21+
)
2022

2123
def test_no_additional_properties_is_valid_passes(self):
2224
# no additional properties is valid

samples/client/3_0_3_unit_test/python/test/components/schema/test_additionalproperties_are_allowed_by_default.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616

1717
class TestAdditionalpropertiesAreAllowedByDefault(unittest.TestCase):
1818
"""AdditionalpropertiesAreAllowedByDefault unit test stubs"""
19-
configuration = schema_configuration.SchemaConfiguration()
19+
configuration = schema_configuration.SchemaConfiguration(
20+
disabled_json_schema_keywords={'format'}
21+
)
2022

2123
def test_additional_properties_are_allowed_passes(self):
2224
# additional properties are allowed

samples/client/3_0_3_unit_test/python/test/components/schema/test_additionalproperties_can_exist_by_itself.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616

1717
class TestAdditionalpropertiesCanExistByItself(unittest.TestCase):
1818
"""AdditionalpropertiesCanExistByItself unit test stubs"""
19-
configuration = schema_configuration.SchemaConfiguration()
19+
configuration = schema_configuration.SchemaConfiguration(
20+
disabled_json_schema_keywords={'format'}
21+
)
2022

2123
def test_an_additional_invalid_property_is_invalid_fails(self):
2224
# an additional invalid property is invalid

samples/client/3_0_3_unit_test/python/test/components/schema/test_additionalproperties_should_not_look_in_applicators.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616

1717
class TestAdditionalpropertiesShouldNotLookInApplicators(unittest.TestCase):
1818
"""AdditionalpropertiesShouldNotLookInApplicators unit test stubs"""
19-
configuration = schema_configuration.SchemaConfiguration()
19+
configuration = schema_configuration.SchemaConfiguration(
20+
disabled_json_schema_keywords={'format'}
21+
)
2022

2123
def test_properties_defined_in_allof_are_not_examined_fails(self):
2224
# properties defined in allOf are not examined

samples/client/3_0_3_unit_test/python/test/components/schema/test_allof.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616

1717
class TestAllof(unittest.TestCase):
1818
"""Allof unit test stubs"""
19-
configuration = schema_configuration.SchemaConfiguration()
19+
configuration = schema_configuration.SchemaConfiguration(
20+
disabled_json_schema_keywords={'format'}
21+
)
2022

2123
def test_allof_passes(self):
2224
# allOf

samples/client/3_0_3_unit_test/python/test/components/schema/test_allof_combined_with_anyof_oneof.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616

1717
class TestAllofCombinedWithAnyofOneof(unittest.TestCase):
1818
"""AllofCombinedWithAnyofOneof unit test stubs"""
19-
configuration = schema_configuration.SchemaConfiguration()
19+
configuration = schema_configuration.SchemaConfiguration(
20+
disabled_json_schema_keywords={'format'}
21+
)
2022

2123
def test_allof_true_anyof_false_oneof_false_fails(self):
2224
# allOf: true, anyOf: false, oneOf: false

samples/client/3_0_3_unit_test/python/test/components/schema/test_allof_simple_types.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616

1717
class TestAllofSimpleTypes(unittest.TestCase):
1818
"""AllofSimpleTypes unit test stubs"""
19-
configuration = schema_configuration.SchemaConfiguration()
19+
configuration = schema_configuration.SchemaConfiguration(
20+
disabled_json_schema_keywords={'format'}
21+
)
2022

2123
def test_valid_passes(self):
2224
# valid

samples/client/3_0_3_unit_test/python/test/components/schema/test_allof_with_base_schema.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616

1717
class TestAllofWithBaseSchema(unittest.TestCase):
1818
"""AllofWithBaseSchema unit test stubs"""
19-
configuration = schema_configuration.SchemaConfiguration()
19+
configuration = schema_configuration.SchemaConfiguration(
20+
disabled_json_schema_keywords={'format'}
21+
)
2022

2123
def test_valid_passes(self):
2224
# valid

0 commit comments

Comments
 (0)