def __init__(self, request): skills = Skills(request) self.race = skills.get_race() self.skills = skills.get_skills() self.multiplier = skills.get_multiplier() self.fill_skills = skills.get_fill_skills() self.default_level = self.predict_level("default") self.desired_level = self.predict_desired_level(request) self.commands = self.commands_list()
def reset_skills(request): skills = Skills(request) race = skills.get_race() skills_after_reset = default_skills_race_update(race) skills.save_skills(skills_after_reset) skills.save_fill_skills(None)
def test_can_get_default_race(self): request = self.FakeRequest() skills = Skills(request) self.assertEqual(skills.get_race(), "nord")
def test_can_get_race(self): request = self.FakeRequest() request.session.update({"race": "ork"}) skills = Skills(request) self.assertEqual(skills.get_race(), "ork")