def setUp(self): factories.CharacterFactory(name="Zäxxer", race="Örkki", occupation="Paskan kerääjä") self.admin = factories.UserFactory(username='******') self.assertTrue(self.client.login(username='******', password='******'))
def setUp(self): self.campaign = factories.CampaignFactory(name='2K') self.admin = factories.UserFactory(username="******", password="******") self.character = factories.CharacterFactory(name="John Doe", owner=self.admin, campaign=self.campaign, occupation="adventurer") self.assertTrue(self.client.login(username="******", password="******"))
def setUp(self): factories.SheetFactory(character__name="Martel", character__campaign__name="FRP") factories.SheetFactory(character__name="Yukaghir", character__campaign__name="FRP") factories.SheetFactory(character__name="Asa", character__campaign__name="MR") self.admin = factories.UserFactory(username='******') self.assertTrue(self.client.login(username='******', password='******'))
def test_import_handgun_weight_gives_good_error_message(self): self.admin = factories.UserFactory(username='******') self.assertTrue(self.client.login(username="******", password="******")) det_url = reverse("import") response = self.client.post(det_url, { 'import_data' : ("BaseFirearm\n" "name,description,notes,tech_level,draw_initiative,durability,dp,weight,base_skill,skill,skill2,target_initiative,range_s,range_m,range_l,autofire_rpm,autofire_class,sweep_fire_disabled,restricted_burst_rounds,stock,duration,weapon_class_modifier,accuracy,sight,barrel_length,ammunition_types\n" "Colt SA Army 1873 4.8\",,,2K,-3,4,4,1.021,Handguns,,,-1,12,24,36,,,FALSE,0,1,0.08,10,0.85,170,121,45Clt"), }) self.assertRedirects(response, reverse("import"))
def setUp(self): self.request_factory = django.test.RequestFactory() self.admin = factories.UserFactory(username="******") self.original_owner = factories.UserFactory(username="******") self.original_sheet = factories.SheetFactory( character__name="John Doe", character__campaign__name="3K", character__owner=self.original_owner, armor=factories.ArmorFactory(base__name="Hard Leather"), helm=factories.HelmFactory(base__name="Leather hood"), weapons=[ factories.WeaponFactory(base__name="Short sword"), factories.WeaponFactory(base__name="Baton") ], ranged_weapons=[ factories.RangedWeaponFactory(base__name="Short bow"), factories.RangedWeaponFactory(base__name="Javelin") ], firearms=[ factories.FirearmFactory(base__name="M29 (OICW)", ammo__label='5.56Nto', ammo__bullet_type='FMJ'), factories.FirearmFactory(base__name="RK95", ammo__label='5.56Nto', ammo__bullet_type='FMJ') ], transient_effects=[ factories.TransientEffectFactory(name="Bless of templars"), factories.TransientEffectFactory(name="Courage of ancients") ], character__skills=[("Shooting", 3), ("Heckling", 2), ("Drunken boxing", 4)], character__edges=[("Toughness", 3), ("Athletic ability", 2), ("Bad eyesight", 4)]) self.original_character = self.original_sheet.character factories.SheetMiscellaneousItemFactory(item__name="Geiger counter", sheet=self.original_sheet) factories.SheetMiscellaneousItemFactory(item__name="Bandolier", sheet=self.original_sheet)
def setUp(self): self.request_factory = django.test.RequestFactory() self.admin = factories.UserFactory(username="******") self.assertTrue(self.client.login(username="******", password="******")) self.sheet = factories.SheetFactory() factories.SkillFactory(name="Acting / Bluff")
def setUp(self): self.admin = factories.UserFactory(username="******") factories.SheetFactory(character__name="Foo") self.middle_sheet = factories.SheetFactory(character__name="Bar") factories.SheetFactory(character__name="Qux") self.assertTrue(self.client.login(username="******", password="******"))
def setUp(self): factories.UserFactory(username="******", password="******") self.character = factories.CharacterFactory(campaign__name="2k", name="John Doe") self.url = reverse('edit_character', args=(self.character.pk, )) self.assertTrue(self.client.login(username="******", password="******"))
def setUp(self): self.campaign = factories.CampaignFactory(name='2K') self.admin = factories.UserFactory(username="******", password="******") self.assertTrue(self.client.login(username="******", password="******"))
def setUp(self): factories.UserFactory(username="******") self.assertTrue(self.client.login(username="******", password="******"))
def setUp(self): factories.UserFactory(username="******") self.character = factories.CharacterFactory(occupation="Priest") self.assertTrue(self.client.login(username="******", password="******"))
def setUp(self): self.admin = factories.UserFactory(username='******') self.assertTrue(self.client.login(username="******", password="******")) factories.SkillFactory(name="Unarmed combat") factories.BaseFirearmFactory(name="Glock 19")