'Test that a staff request for a nonexistent username returns an error.'

@ddt.data('staff', 'global_staff')
def test_staff_requests_nonexistent_user(self, staff_user):

    self.client.logout()
    self.client.login(username=getattr(self, staff_user).username, password=self.password)
    resp = self.client.get(self.get_url('IDoNotExist'))
    self.assertEqual(resp.status_code, status.HTTP_404_NOT_FOUND)
    self.assertIn('error_code', resp.data)
    self.assertEqual(resp.data['error_code'], 'user_does_not_exist')
