Skip to content

Commit 23699d4

Browse files
committed
Use OrderedDict when writing cookiecutter.json
1 parent dd43560 commit 23699d4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/test_cookies.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# -*- coding: utf-8 -*-
22

33
import json
4+
import collections
45

56
import pytest
67

@@ -33,10 +34,10 @@ def test_valid_fixture(cookies):
3334
def cookiecutter_template(tmpdir):
3435
template = tmpdir.ensure('cookiecutter-template', dir=True)
3536

36-
template_config = {
37-
'repo_name': 'foobar',
38-
'short_description': 'Test Project',
39-
}
37+
template_config = collections.OrderedDict([
38+
('repo_name', 'foobar'),
39+
('short_description', 'Test Project'),
40+
])
4041
template.join('cookiecutter.json').write(json.dumps(template_config))
4142

4243
template_readme = '\n'.join([

0 commit comments

Comments
 (0)