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 test_have_default_multiplier(self): request = self.FakeRequest() skills = Skills(request) self.assertEqual(skills.get_multiplier(), 1.5)
def test_can_get_multiplier(self): request = self.FakeRequest() request.session.update({"multiplier": 2.5}) skills = Skills(request) self.assertEqual(skills.get_multiplier(), 2.5)