Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
ruscoder committed Sep 6, 2024
1 parent 8aa70f0 commit 642bc0b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tests/test_ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
)
from fhir_py_types.ast import build_ast

EXPECTED_BASE_MODEL_CONFIG = []


def assert_eq(
definitions: Sequence[StructureDefinition], ast_tree: Sequence[ast.stmt | ast.expr]
Expand Down Expand Up @@ -56,7 +54,7 @@ def test_generates_class_for_flat_definition() -> None:
ast.ClassDef(
name="TestResource",
bases=[ast.Name(id="BaseModel")],
keywords=EXPECTED_BASE_MODEL_CONFIG,
keywords=[],
body=[
ast.Expr(value=ast.Constant(value="test resource description")),
ast.AnnAssign(
Expand Down Expand Up @@ -163,7 +161,7 @@ def test_generates_multiple_classes_for_compound_definition() -> None:
ast.ClassDef(
name="NestedTestResource",
bases=[ast.Name(id="BaseModel")],
keywords=EXPECTED_BASE_MODEL_CONFIG,
keywords=[],
body=[
ast.Expr(value=ast.Constant(value="nested resource definition")),
ast.AnnAssign(
Expand Down Expand Up @@ -196,7 +194,7 @@ def test_generates_multiple_classes_for_compound_definition() -> None:
ast.ClassDef(
name="TestResource",
bases=[ast.Name(id="BaseModel")],
keywords=EXPECTED_BASE_MODEL_CONFIG,
keywords=[],
body=[
ast.Expr(value=ast.Constant(value="test resource description")),
ast.AnnAssign(
Expand Down Expand Up @@ -316,7 +314,7 @@ def test_generates_annotations_according_to_structure_type(
ast.ClassDef(
name="TestResource",
bases=[ast.Name(id="BaseModel")],
keywords=EXPECTED_BASE_MODEL_CONFIG,
keywords=[],
body=[
ast.Expr(value=ast.Constant(value="test resource description")),
ast.AnnAssign(
Expand Down Expand Up @@ -406,7 +404,7 @@ def test_unrolls_required_polymorphic_into_class_union() -> None:
ast.ClassDef(
name="TestResource",
bases=[ast.Name(id="BaseModel")],
keywords=EXPECTED_BASE_MODEL_CONFIG,
keywords=[],
body=[
ast.Expr(value=ast.Constant(value="test resource description")),
ast.AnnAssign(
Expand Down

0 comments on commit 642bc0b

Please sign in to comment.