Add test that default username is picked
MODIFY
repo2docker/__init__.py
repo2docker/__init__.py
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
+
+from .app import Repo2Docker

MODIFY
tests/unit/test_users.py
tests/unit/test_users.py
@@ -5,6 +5,20 @@ import os
import subprocess
import tempfile
import time
+from unittest import mock
+
+from repo2docker import Repo2Docker
+
+
+def test_automatic_username_deduction():
+ # check we pickup the right username
+ with mock.patch('os.environ') as mock_env:
+ expected = 'someusername'
+ mock_env.get.return_value = expected
+
+ r2d = Repo2Docker()
+ assert r2d.user_name == expected
+
def test_user():
"""

Add test that default username is picked