File tree 1 file changed +7
-17
lines changed
1 file changed +7
-17
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,11 @@ TEMPLATE_DIRECTORY = str(pathlib.Path(__file__).parent.parent)
16
16
17
17
18
18
def test_static_and_templates (tmpdir ):
19
- generate(
20
- tmpdir,
21
- {
19
+ cookiecutter(
20
+ template = TEMPLATE_DIRECTORY ,
21
+ output_dir = str (tmpdir),
22
+ no_input = True ,
23
+ extra_context = {
22
24
" plugin_name" : " foo" ,
23
25
" description" : " blah" ,
24
26
" include_templates_directory" : " y" ,
@@ -41,22 +43,10 @@ def test_static_and_templates(tmpdir):
41
43
" datasette-foo/tests" ,
42
44
" datasette-foo/tests/test_foo.py" ,
43
45
}
46
+ setup_py = (tmpdir / " datasette-foo" / " setup.py" ).read_text(" utf-8" )
44
47
assert (
45
48
' package_data={\n "datasette_foo": ["static/*", "templates/*"]\n }'
46
- ) in read_setup_py(tmpdir)
47
-
48
-
49
- def generate (directory , context ):
50
- cookiecutter(
51
- template = TEMPLATE_DIRECTORY ,
52
- output_dir = str (directory),
53
- no_input = True ,
54
- extra_context = context,
55
- )
56
-
57
-
58
- def read_setup_py (tmpdir ):
59
- return (tmpdir / " datasette-foo" / " setup.py" ).read_text(" utf-8" )
49
+ ) in setup_py
60
50
61
51
62
52
def paths (directory ):
You can’t perform that action at this time.
0 commit comments