(component_class)
| 38 | |
| 39 | |
| 40 | def test_to_plotly_json(component_class): |
| 41 | c = component_class() |
| 42 | assert c.to_plotly_json() == { |
| 43 | "namespace": "TableComponents", |
| 44 | "type": "Table", |
| 45 | "props": {"children": None}, |
| 46 | } |
| 47 | |
| 48 | c = component_class(id="my-id") |
| 49 | assert c.to_plotly_json() == { |
| 50 | "namespace": "TableComponents", |
| 51 | "type": "Table", |
| 52 | "props": {"children": None, "id": "my-id"}, |
| 53 | } |
| 54 | |
| 55 | c = component_class(id="my-id", optionalArray=None) |
| 56 | assert c.to_plotly_json() == { |
| 57 | "namespace": "TableComponents", |
| 58 | "type": "Table", |
| 59 | "props": {"children": None, "id": "my-id", "optionalArray": None}, |
| 60 | } |
| 61 | |
| 62 | |
| 63 | def test_arguments_become_attributes(component_class): |
nothing calls this directly
no test coverage detected
searching dependent graphs…