Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Commit

Permalink
fixing a python 2.6 incompatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mhrivnak committed Apr 30, 2014
1 parent 26fcf48 commit 073896d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crane/config.py
Expand Up @@ -18,7 +18,7 @@
config_defaults = {
KEY_DEBUG: 'false',
KEY_DATA_DIR: '/var/lib/crane/metadata/',
KEY_ENDPOINT: None,
KEY_ENDPOINT: '',
}


Expand Down
2 changes: 1 addition & 1 deletion tests/api/test_repositories.py
Expand Up @@ -23,7 +23,7 @@ def test_detect_endpoint(self):
Set the configured endpoint to None, forcing crane to detect what
host and port are being accessed by the request.
"""
self.app.config[config.KEY_ENDPOINT] = None
self.app.config[config.KEY_ENDPOINT] = ''

response = self.test_client.get('/v1/repositories/redhat/foo/images')

Expand Down
2 changes: 1 addition & 1 deletion tests/test_config.py
Expand Up @@ -22,7 +22,7 @@ def test_defaults(self, mock_get, mock_readfp):

self.assertTrue(self.app.config.get('DEBUG') is False)
self.assertEqual(self.app.config.get(config.KEY_DATA_DIR), '/var/lib/crane/metadata/')
self.assertTrue(self.app.config.get(config.KEY_ENDPOINT) is None)
self.assertEqual(self.app.config.get(config.KEY_ENDPOINT), '')

@mock.patch('os.environ.get', return_value='/a/b/c/idontexist', spec_set=True)
def test_file_not_found(self, mock_get):
Expand Down

0 comments on commit 073896d

Please sign in to comment.