Ejemplo n.º 1
0
 def setUp(self):
     self.person = PersonFactory.create()
     self.password = "******"
     self.name = "kaptajn hack"
     self.admin = User.objects.create_superuser(self.name,
                                                "*****@*****.**",
                                                self.password)
     self.browser = webdriver.Remote("http://selenium:4444/wd/hub",
                                     DesiredCapabilities.CHROME)
Ejemplo n.º 2
0
 def setUp(self):
     self.email = "*****@*****.**"
     self.browser = webdriver.Remote("http://selenium:4444/wd/hub",
                                     DesiredCapabilities.CHROME)
     self.family = FamilyFactory()
     self.person = PersonFactory.create(family=self.family)
     self.first_kid = PersonFactory.create(family=self.family,
                                           membertype="CH")
     self.second_kid = PersonFactory.create(family=self.family,
                                            membertype="CH")
     self.activity = ActivityFactory.create(
         start_date=date.today(),
         signup_closing=date.today(),
         open_invite=True,
         max_participants=2,
         min_age=0,
         max_age=100,
     )
Ejemplo n.º 3
0
    def setUp(self):
        self.email = "*****@*****.**"
        self.password = "******"
        self.member = MemberFactory.create(person=PersonFactory.create(
            birthday=Faker("date_between", start_date="-50y", end_date="-10y"),
            user=UserFactory.create(
                username=self.email, email=self.email, password=self.password),
        ))
        self.member.person.user.set_password(self.password)
        self.member.person.user.save()
        self.member.person.birthday = datetime.date(1980, 1, 10)

        self.activity_arrangement = ActivityFactory.create(
            open_invite=True,
            signup_closing=Faker("future_datetime", end_date="+100d"),
            min_age=5,
            max_age=90,
            name="Arrangement",
            activitytype_id="ARRANGEMENT",
        )
        self.activity_arrangement.save()
        self.activity_arrangement_participate = ActivityFactory.create(
            name="Arrangement deltagelse", activitytype_id="ARRANGEMENT")
        self.activity_arrangement_participate.save()
        ActivityParticipantFactory.create(
            activity=self.activity_arrangement_participate,
            member=self.member).save()
        self.activity_forløb = ActivityFactory.create(
            open_invite=True,
            signup_closing=Faker("future_datetime", end_date="+100d"),
            min_age=5,
            max_age=90,
            name="Forløb",
            activitytype_id="FORLØB",
        )
        self.activity_forløb.save()
        self.activity_forløb_participate = ActivityFactory.create(
            name="Forløb deltagelse", activitytype_id="FORLØB")
        self.activity_forløb_participate.save()
        ActivityParticipantFactory.create(
            activity=self.activity_forløb_participate,
            member=self.member).save()
        self.activity_foreningsmedlemskab = ActivityFactory.create(
            open_invite=True,
            signup_closing=Faker("future_datetime", end_date="+100d"),
            min_age=5,
            max_age=90,
            name="Foreningsmedlemskab",
            activitytype_id="FORENINGSMEDLEMSKAB",
        )
        self.activity_foreningsmedlemskab.save()
        self.activity_foreningsmedlemskab_participate = ActivityFactory.create(
            name="Foreningsmedlemskab deltagelse",
            activitytype_id="FORENINGSMEDLEMSKAB")
        self.activity_foreningsmedlemskab_participate.save()
        ActivityParticipantFactory.create(
            activity=self.activity_foreningsmedlemskab_participate,
            member=self.member).save()
        self.activity_støttemedlemskab = ActivityFactory.create(
            open_invite=True,
            signup_closing=Faker("future_datetime", end_date="+100d"),
            min_age=5,
            max_age=90,
            name="Støttemedlemskab",
            activitytype_id="STØTTEMEDLEMSKAB",
        )
        self.activity_støttemedlemskab.save()
        self.activity_støttemedlemskab_participate = ActivityFactory.create(
            name="Støttemedlemskab deltagelse",
            activitytype_id="STØTTEMEDLEMSKAB")
        self.activity_støttemedlemskab_participate.save()
        ActivityParticipantFactory.create(
            activity=self.activity_støttemedlemskab_participate,
            member=self.member).save()

        self.browser = webdriver.Remote("http://*****:*****@value='Log ind']").click()
        self.browser.save_screenshot("test-screens/activities_logged_in.png")