MCPcopy Index your code
hub / github.com/plotly/dash / generate_mock_data

Function generate_mock_data

components/dash-table/tests/selenium/utils.py:106–213  ·  view source on GitHub ↗
(rows=100)

Source from the content-addressed store, hash-verified

104
105
106def generate_mock_data(rows=100):
107 return dict(
108 columns=[
109 dict(id="rows", type="numeric", editable=False),
110 dict(
111 id="ccc",
112 name=["City", "Canada", "Toronto"],
113 type="numeric",
114 ),
115 dict(
116 id="ddd",
117 name=["City", "Canada", "Montréal"],
118 type="numeric",
119 ),
120 dict(
121 id="eee",
122 name=["City", "America", "New York City"],
123 type="numeric",
124 ),
125 dict(
126 id="fff",
127 name=["City", "America", "Boston"],
128 type="numeric",
129 ),
130 dict(
131 id="ggg",
132 name=["City", "France", "Paris"],
133 type="numeric",
134 ),
135 dict(
136 id="bbb",
137 name=["", "Weather", "Climate"],
138 type="text",
139 presentation="dropdown",
140 ),
141 dict(
142 id="bbb-readonly",
143 name=["", "Weather", "Climate-RO"],
144 type="text",
145 editable=False,
146 presentation="dropdown",
147 ),
148 dict(id="aaa", name=["", "Weather", "Temperature"], type="numeric"),
149 dict(
150 id="aaa-readonly",
151 name=["", "Weather", "Temperature-RO"],
152 type="numeric",
153 editable=False,
154 ),
155 ],
156 data=[
157 {
158 "rows": i,
159 "ccc": i,
160 "ddd": i,
161 "eee": i,
162 "fff": i + 1,
163 "ggg": i * 10,

Callers 1

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…