jupyterhub / batchspawner

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

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

Closed minrk closed 6 months ago

minrk commented 6 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 6 months ago

Merging since this is small and gets tests passing again