File tree 3 files changed +14
-1
lines changed
3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 47
47
DEMO_SCOPE = 'citrine-demo'
48
48
49
49
50
+ def import_toothpick_picture ():
51
+ """Return the stream of the toothpick picture."""
52
+ import pkg_resources
53
+ resource = pkg_resources .resource_stream ("taurus.demo" , "toothpick.jpg" )
54
+
55
+ return resource
56
+
57
+
50
58
def make_cake_templates ():
51
59
"""Define all templates independently, as in the wild this will be an independent operation."""
52
60
tmpl = dict ()
Original file line number Diff line number Diff line change 9
9
from taurus .entity .object .ingredient_run import IngredientRun
10
10
11
11
from taurus .client .json_encoder import dumps , loads
12
- from taurus .demo .cake import make_cake
12
+ from taurus .demo .cake import make_cake , import_toothpick_picture
13
13
from taurus .util import recursive_foreach
14
14
from taurus .entity .util import complete_material_history
15
15
@@ -112,3 +112,8 @@ def check_ids(obj):
112
112
assert obj .spec .material == obj .material .spec
113
113
if obj .material :
114
114
queue .append (obj .material )
115
+
116
+
117
+ def test_import ():
118
+ """Make sure picture import runs."""
119
+ import_toothpick_picture ()
You can’t perform that action at this time.
0 commit comments