Skip to content

Commit

Permalink
add unittest for recursive json (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
koxudaxi committed Jul 19, 2020
1 parent 5066fa2 commit 5c02ff7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/data/expected/main/space_and_special_characters/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,21 @@ class Values(BaseModel):
field_2_Step: str = Field(..., alias='2 Step')


class Recursive1(BaseModel):
value: float


class Sub(BaseModel):
recursive: Recursive1


class Recursive(BaseModel):
sub: Sub


class Model(BaseModel):
Serial_Number: str = Field(..., alias='Serial Number')
Timestamp: str
Data: Data
values: Values
recursive: Recursive
7 changes: 7 additions & 0 deletions tests/data/json/space_and_special_characters.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,12 @@
"values": {
"1 Step": "42",
"2 Step": "23"
},
"recursive": {
"sub": {
"recursive": {
"value": 42.23
}
}
}
}

0 comments on commit 5c02ff7

Please sign in to comment.