Skip to content

Commit

Permalink
Merge pull request #83 from loganasherjones/issue/82
Browse files Browse the repository at this point in the history
Fixes #82
  • Loading branch information
loganasherjones committed Jun 26, 2018
2 parents 1c50a5a + c2a6f90 commit ad7518e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/spec_test.py
Expand Up @@ -268,7 +268,7 @@ def test_migrate_config_file_does_not_exist_create(basic_spec):
@patch('os.path.isfile', Mock(return_value=False))
def test_migrate_config_file_create_yaml(basic_spec):
open_path = 'yapconf.open'
with patch('yapconf.yaml.dump') as dump_mock:
with patch('yapconf.yaml.safe_dump') as dump_mock:
with patch(open_path, mock_open()) as mock_file:
new_config = basic_spec.migrate_config_file(
'/path/to/file', create=True, output_file_type='yaml')
Expand Down
2 changes: 1 addition & 1 deletion tests/yapconf_test.py
Expand Up @@ -20,7 +20,7 @@ def ascii_data():
@pytest.fixture
def unicode_data():
return {
'foo': 'bar',
u'foo': u'bar',
'db': {'name': 'db_name', 'port': 123},
'items': [1, 2, 3],
u'💩': u'🐍',
Expand Down
2 changes: 1 addition & 1 deletion yapconf/__init__.py
Expand Up @@ -163,7 +163,7 @@ def _dump(data, stream, file_type, **kwargs):
else:
stream.write(six.u(dumped))
elif str(file_type).lower() == 'yaml':
yaml.dump(data, stream, **kwargs)
yaml.safe_dump(data, stream, **kwargs)
else:
raise NotImplementedError('Someone forgot to implement dump for file '
'type: %s' % file_type)
Expand Down

0 comments on commit ad7518e

Please sign in to comment.