Ejemplo n.º 1
0
    def setUp(self):
        super().setUp()
        consultee = FactoryFloor.ConsultationRoleFactory()
        org = consultee.organization
        org.grouping.add(1)  # make sure it will load as an indigenous org
        instructions = FactoryFloor.ConsultationInstructionFactory(organization=org)

        status = models.Status.objects.first()
        sector = FactoryFloor.SectorFactory()
        entry_type = models.EntryType.objects.first()
        for x in range(1, 10):
            e = FactoryFloor.EntryFactory(status=status)
            e.organizations.add(org)
            e.sectors.add(sector)
        activate('en')

        self.test_urls = [
            reverse_lazy('ihub:consultation_log_pdf') + "?fy=None&sectors=None&orgs=None&statuses=None&entry_types=None&report_title=Test&from_date=None&to_date=None",
            reverse_lazy('ihub:consultation_log_xlsx') + "?fy=None&sectors=None&orgs=None&statuses=None&entry_types=None&report_title=Test&from_date=None&to_date=None",
            reverse_lazy('ihub:summary_xlsx') + "?fy=None&sectors=None&orgs=None&from_date=None&to_date=None",
            reverse_lazy('ihub:summary_pdf') + "?fy=None&sectors=None&orgs=None&from_date=None&to_date=None",
            reverse_lazy('ihub:capacity_xlsx') + "?fy=None&sectors=None&orgs=None&from_date=None&to_date=None",
            reverse_lazy('ihub:report_q', args=[org.id]),
            reverse_lazy('ihub:consultation_instructions_pdf'),
            reverse_lazy('ihub:consultation_instructions_xlsx'),
        ]
        self.view = views.ConsultationLogPDFTemplateView
Ejemplo n.º 2
0
 def setUp(self):
     super().setUp()
     self.instance = FactoryFloor.EntryFactory()
     self.test_url = reverse_lazy('ihub:entry_edit',
                                  args=[
                                      self.instance.pk,
                                  ])
     self.expected_template = 'ihub/form.html'
     self.user = self.get_and_login_user(in_group="ihub_edit")
Ejemplo n.º 3
0
 def setUp(self):
     super().setUp()
     self.instance = FactoryFloor.EntryFactory()
     self.test_url = reverse_lazy('ihub:note_new',
                                  args=[
                                      self.instance.pk,
                                  ])
     self.expected_template = 'shared_models/generic_popout_form.html'
     self.user = self.get_and_login_user(in_group="ihub_edit")
Ejemplo n.º 4
0
 def setUp(self):
     super().setUp()
     self.instance = FactoryFloor.EntryFactory()
     self.test_url = reverse_lazy('ihub:entry_detail',
                                  args=[
                                      self.instance.pk,
                                  ])
     self.expected_template = 'ihub/entry_detail.html'
     self.user = self.get_and_login_user()