Skip to content

Commit

Permalink
Fix DateProperty but in inspection script
Browse files Browse the repository at this point in the history
  • Loading branch information
Marius Conjeaud committed May 22, 2024
1 parent 35c35e6 commit a37d127
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions neomodel/scripts/neomodel_inspect_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ def parse_prop_class(prop_type):
elif prop_type == "BOOLEAN":
_import = "BooleanProperty"
prop_class = f"{_import}("
elif prop_type == "DATE":
_import = "DateProperty"
prop_class = f"{_import}("
elif prop_type == "DATE_TIME":
_import = "DateTimeProperty"
prop_class = f"{_import}("
Expand Down
1 change: 1 addition & 0 deletions test/data/neomodel_inspect_database_output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class EveryPropertyTypeNode(StructuredNode):
boolean_property = BooleanProperty()
point_property = PointProperty(crs='wgs-84')
string_property = StringProperty()
date_property = DateProperty()
datetime_property = DateTimeProperty()
integer_property = IntegerProperty()

Expand Down
1 change: 1 addition & 0 deletions test/data/neomodel_inspect_database_output_light.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class EveryPropertyTypeNode(StructuredNode):
boolean_property = BooleanProperty()
point_property = PointProperty(crs='wgs-84')
string_property = StringProperty()
date_property = DateProperty()
datetime_property = DateTimeProperty()
integer_property = IntegerProperty()

Expand Down
1 change: 1 addition & 0 deletions test/data/neomodel_inspect_database_output_pre_5_7.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class EveryPropertyTypeNode(StructuredNode):
boolean_property = BooleanProperty()
point_property = PointProperty(crs='wgs-84')
string_property = StringProperty()
date_property = DateProperty()
datetime_property = DateTimeProperty()
integer_property = IntegerProperty()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class EveryPropertyTypeNode(StructuredNode):
boolean_property = BooleanProperty()
point_property = PointProperty(crs='wgs-84')
string_property = StringProperty()
date_property = DateProperty()
datetime_property = DateTimeProperty()
integer_property = IntegerProperty()

Expand Down
1 change: 1 addition & 0 deletions test/test_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def test_neomodel_inspect_database(script_flavour):
CREATE (:EveryPropertyTypeNode {
string_property: "Hello World",
boolean_property: true,
date_property: date("2020-01-01"),
datetime_property: datetime("2020-01-01T00:00:00.000Z"),
integer_property: 1,
float_property: 1.0,
Expand Down

0 comments on commit a37d127

Please sign in to comment.