コード例 #1
0
 def setUp(self):
     self.project = Domain(name=self.domain)
     self.project.save()
     self.location_types, self.locations = setup_enikshay_locations(
         self.domain)
     self.factory = CaseFactory(domain=self.domain)
     self.cases = self.setup_cases()
コード例 #2
0
    def setUpClass(cls):
        super(UserRepeaterTest, cls).setUpClass()
        cls.domain_obj = Domain(name=cls.domain)
        cls.domain_obj.save()

        _, locations = setup_enikshay_locations(cls.domain)
        cls.private_location = locations['PCP']
        cls.private_location.metadata['private_sector_org_id'] = 'ORG_ID'
        cls.private_location.save()
        cls.dto_location = locations['DTO']
        cls.public_location = locations['DRTB-HIV']
        cls.test_location = locations['PAC']
        cls.test_location.metadata['is_test'] = "yes"
        cls.test_location.save()

        cls.repeater = BETSUserRepeater(
            domain=cls.domain,
            url='super-cool-url',
        )
        cls.repeater.save()