Esempio n. 1
0
    def setUp(self):
        super().setUp()

        self.etr = Factory.EtrFactory()

        self.test_url = reverse_lazy('whalesdb:details_etr',
                                     args=(self.etr.pk, ))
        self.test_expected_template = 'whalesdb/whales_details.html'
        self.fields = [
            'eqp', 'etr_date', 'etr_issue_desc', 'etr_repair_desc',
            'etr_repaired_by', 'etr_dep_affe', 'etr_rec_affe'
        ]
Esempio n. 2
0
    def setUp(self):
        super().setUp()

        eqt = models.EqtEquipmentTypeCode.objects.get(pk=4)
        emm = Factory.EmmFactory(eqt=eqt)
        eca_hydrophone = Factory.EqpFactory(emm=emm)

        self.etr = Factory.EtrFactory(hyd=eca_hydrophone)

        self.test_url = reverse_lazy('whalesdb:details_etr', args=(self.etr.pk,))
        self.test_expected_template = 'whalesdb/whales_details.html'
        self.fields = ['eqp', 'etr_date', 'etr_issue_desc', 'etr_repair_desc', 'etr_repaired_by', 'etr_dep_affe',
                       'etr_rec_affe']
Esempio n. 3
0
    def setUp(self):
        super().setUp()

        self.data = Factory.EtrFactory.get_valid_data()

        obj = Factory.EtrFactory()

        self.test_url = reverse_lazy('whalesdb:update_etr', args=(obj.pk,))

        # Since this is intended to be used as a pop-out form, the html file should start with an underscore
        self.test_expected_template = 'shared_models/shared_entry_form.html'

        self.expected_view = views.EtrUpdate

        self.expected_form = forms.EtrForm

        self.expected_success_url = reverse_lazy('whalesdb:details_etr', args=(obj.pk,))
Esempio n. 4
0
    def setUp(self):
        super().setUp()

        self.data = Factory.EtrFactory.get_valid_data()

        eqt = models.EqtEquipmentTypeCode.objects.get(pk=4)
        emm = Factory.EmmFactory(eqt=eqt)
        eca_hydrophone = Factory.EqpFactory(emm=emm)

        obj = Factory.EtrFactory(hyd=eca_hydrophone)

        self.test_url = reverse_lazy('whalesdb:update_etr', args=(obj.pk, ))

        # Since this is intended to be used as a pop-out form, the html file should start with an underscore
        self.test_expected_template = 'shared_models/shared_entry_form.html'

        self.expected_view = views.EtrUpdate

        self.expected_form = forms.EtrForm

        self.expected_success_url = reverse_lazy('whalesdb:details_etr',
                                                 args=(obj.pk, ))