File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change 66from selenium import webdriver
77
88from neo4j_viz import Node , Relationship , VisualizationGraph
9+ from neo4j_viz .nvl import NVL
910from neo4j_viz .options import Layout , Renderer
1011
1112render_cases = {
@@ -98,15 +99,15 @@ def test_render_warnings() -> None:
9899def test_render_non_json_serializable () -> None :
99100 import datetime
100101
101- nodes = [
102- Node (
103- id = 0 ,
104- properties = {
105- "non-json-serializable" : datetime . datetime . now () ,
106- },
107- )
108- ]
109-
110- VG = VisualizationGraph (nodes = nodes , relationships = [])
111-
102+ now = datetime . datetime . now ()
103+ node = Node (
104+ id = 0 ,
105+ properties = {
106+ "non-json-serializable" : now ,
107+ },
108+ )
109+ assert str ( now ) in NVL . _serialize_entity ( node )
110+
111+ VG = VisualizationGraph (nodes = [ node ] , relationships = [])
112+ # Should not raise an error
112113 VG .render ()
You can’t perform that action at this time.
0 commit comments