diff --git a/integration-tests/plugins/simplest/tljh_simplest.py b/integration-tests/plugins/simplest/tljh_simplest.py index 3c6a3f7..f77f19b 100644 --- a/integration-tests/plugins/simplest/tljh_simplest.py +++ b/integration-tests/plugins/simplest/tljh_simplest.py @@ -46,3 +46,9 @@ def tljh_custom_jupyterhub_config(c): def tljh_post_install(): with open('test_post_install', 'w') as f: f.write('123456789') + + +@hookimpl +def tljh_new_user_create(username): + with open('test_new_user_create', 'w') as f: + f.write("a new userfile") diff --git a/integration-tests/test_simplest_plugin.py b/integration-tests/test_simplest_plugin.py index bb07a83..d2f973c 100644 --- a/integration-tests/test_simplest_plugin.py +++ b/integration-tests/test_simplest_plugin.py @@ -72,3 +72,13 @@ def test_post_install_hook(): content = f.read() assert content == "123456789" + + +def test_tljh_new_user_create(): + """ + Test that plugin receives username as arg + """ + with open("test_new_user_create") as f: + content = f.read() + + assert content == "a new userfile"