def test_staff_index_when_one_staff(User): request = DummyRequest() User.staff_members.return_value = [Mock(username="******")] result = admin.staff_index(request) assert result["staff"] == ["fred"]
def test_staff_index_when_no_staff(User): request = DummyRequest() User.staff_members.return_value = [] result = admin.staff_index(request) assert result["staff"] == []