jupyterhub / batchspawner

Custom Spawner for Jupyterhub to start servers in batch scheduled systems
BSD 3-Clause "New" or "Revised" License
190 stars 134 forks source link

TST: don't assume test user is OS user #301

Closed minrk closed 8 months ago

minrk commented 8 months ago

mock getpwnam to always return result for current user

since test user may well not exist on the system

In particular, JupyterHub 5 test utilities no longer create a test user with the running user's name, which is causing tests to fail, since so far batchspawner tests have assumed that the first user in the database matches getpass.getuser().

minrk commented 8 months ago

Merging since this is small and gets tests passing again