Skip to content

Commit bd6aa16

Browse files
authored
Fix config json (#56)
* return none instead of empty dict * bump version * fix test * Update image_test.py
1 parent 8cb2021 commit bd6aa16

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ouroboros/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def check_credentials():
1010
if environ.get('REPO_USER') and environ.get('REPO_PASS'):
1111
return {'username': environ['REPO_USER'],
1212
'password': environ['REPO_PASS']}
13-
return {}
13+
return None
1414

1515

1616
def pull_latest(image, keep_tag, api_client):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def read_reqs(requirements):
1313

1414
setup(
1515
name='ouroboros-cli',
16-
version='0.3.1',
16+
version='0.3.2',
1717
description='Automatically update running docker containers',
1818
long_description=readme(),
1919
long_description_content_type='text/markdown',

tests/unit/image_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
def test_image_check_credentials_no_env_var():
7-
assert image.check_credentials() == {}
7+
assert not image.check_credentials()
88

99

1010
def test_image_check_credentials_env_var(mocker):
@@ -14,7 +14,7 @@ def test_image_check_credentials_env_var(mocker):
1414

1515
def test_image_check_credentials_false_env_var(mocker):
1616
mocker.patch.dict('os.environ', {'REPO_USR': 'test_user', 'REPO_PaSS': 'test_pass'})
17-
assert image.check_credentials() == {}
17+
assert not image.check_credentials()
1818

1919

2020
def test_image_is_up_to_date():
@@ -32,4 +32,4 @@ def test_remove_exception(mocker, caplog):
3232

3333
image.remove(fake_image, fake_api)
3434
fake_api.remove_image.assert_called_once_with(fake_image)
35-
assert 'Could not clean up image: testcontainer:1.1, reason:' in caplog.text
35+
assert 'Could not clean up image: testcontainer:1.1, reason:' in caplog.text

0 commit comments

Comments
 (0)