Exemple #1
0
    def setUp(self):
        self.user_nonmember = user_nonmember(identifier='foo')

        self.user_pending_member = user_pending_member(memberid=123)
        self.user_pending_member.save()
        self.zipcode = zipcode()
        self.zipcode.save()
        self.enrollment = enrollment(self.user_pending_member.memberid, self.zipcode)
        self.enrollment.save()

        self.user_member = user_member(memberid=456)
        self.user_member.save()
        self.actor = actor(memberid=self.user_member.memberid)
        self.actor.main_forening_id = 1
        self.actor.save()
        self.forening = forening()
        self.forening.focus_id = self.actor.main_forening_id
        self.forening.save()
        self.actor_service = actor_service(actor=self.actor, code=101)
        self.actor_service.save()
        self.zipcode = zipcode()
        self.zipcode.save()
        self.actor_address = actor_address(self.actor, self.zipcode)
        self.actor_address.save()
        self.focus_country = focus_country()
        self.focus_country.code = self.actor_address.country_code
        self.focus_country.save()
        self.balance = balance(self.actor)
        self.balance.current_year = 0
        self.balance.save()
    def setUp(self):
        self.actor = actor(memberid=123)
        self.actor.save()
        self.zipcode = zipcode()
        self.zipcode.save()
        self.actor_address = actor_address(self.actor, self.zipcode)
        self.actor_address.country_code = 'SE'
        self.actor_address.save()

        actor_service(actor=self.actor, code=get_membership_type_by_codename('main')['code']).save()
        actor_service(actor=self.actor, code=FOREIGN_POSTAGE_SERVICE_CODES[0]).save()
    def setUp(self):
        self.user_parent = user_member(memberid=100)
        self.user_parent.save()
        self.actor_parent = actor(memberid=self.user_parent.memberid)
        self.actor_parent.save()
        family_primary = get_membership_type_by_codename('family_primary')
        actor_service(actor=self.actor_parent, code=family_primary['code']).save()

        self.user_child1 = user_member(memberid=101)
        self.user_child1.save()
        self.actor_child1 = actor(memberid=self.user_child1.memberid)
        self.actor_child1.parent = self.actor_parent.memberid
        self.actor_child1.save()
        family_household = get_membership_type_by_codename('family_household')
        actor_service(actor=self.actor_child1, code=family_household['code']).save()

        self.user_child2 = user_member(memberid=102)
        self.user_child2.save()
        self.actor_child2 = actor(memberid=self.user_child2.memberid)
        self.actor_child2.parent = self.actor_parent.memberid
        self.actor_child2.save()
        self.actor_child2_service = actor_service(actor=self.actor_child2, code=family_household['code'])
        self.actor_child2_service.save()
Exemple #4
0
    def setUp(self):
        self.user = user_member(memberid=123)
        self.user.save()

        self.actor = actor(memberid=123)
        self.actor.save()
        self.actor_service = actor_service(actor=self.actor, code=101)
        self.actor_service.save()
        self.zipcode = zipcode()
        self.zipcode.save()
        self.actor_address = actor_address(self.actor, self.zipcode)
        self.actor_address.save()
        self.focus_country = focus_country()
        self.focus_country.code = self.actor_address.country_code
        self.focus_country.save()
        self.balance = balance(self.actor)
        self.balance.current_year = 0
        self.balance.save()

        # A Settings object is required for payment checks
        settings().save()