def test_travel_cant_find(self, db_request): user = DBUserFactory.create() root = UserFactory(db_request) with pytest.raises(KeyError): root[user.username + "invalid"]
def test_traversal_finds(self, db_request, username, normalized): user = DBUserFactory.create(username=username) root = UserFactory(db_request) assert root[normalized] == user