Beispiel #1
0
    def setUp(self):
        super().setUp()

        self.eca = Factory.EcaFactory()

        self.test_url = reverse_lazy('whalesdb:details_eca',
                                     args=(self.eca.pk, ))
        self.test_expected_template = 'whalesdb/details_eca.html'
        self.fields = []
    def setUp(self):
        super().setUp()
        eqt = models.EqtEquipmentTypeCode.objects.get(pk=4)
        emm = Factory.EmmFactory(eqt=eqt)
        eca_hydrophone = Factory.EqpFactory(emm=emm)

        self.eca = Factory.EcaFactory(eca_hydrophone=eca_hydrophone)

        self.test_url = reverse_lazy('whalesdb:details_eca', args=(self.eca.pk,))
        self.test_expected_template = 'whalesdb/details_eca.html'
        self.fields = []
    def setUp(self):
        super().setUp()

        self.data = Factory.EcaFactory.get_valid_data()

        obj = Factory.EcaFactory()

        self.test_url = reverse_lazy('whalesdb:update_eca', 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.EmmUpdate

        self.expected_form = forms.EmmForm

        self.expected_success_url = reverse_lazy("whalesdb:details_eca", args=(obj.pk,))
Beispiel #4
0
    def setUp(self):
        super().setUp()
        self.eca = Factory.EcaFactory()

        self.data = Factory.EccFactory.get_valid_data()

        args = [self.eca.pk, 'pop']

        self.test_url = reverse_lazy('whalesdb:create_ecc', args=args)

        # 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_success_url = reverse_lazy(
            'shared_models:close_me_no_refresh')

        self.expected_view = views.EcaCreate
        self.expected_form = forms.EcaForm
Beispiel #5
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.eca = Factory.EcaFactory(eca_hydrophone=eca_hydrophone)

        self.data = Factory.EccFactory.get_valid_data()

        args = [self.eca.pk, 'pop']

        self.test_url = reverse_lazy('whalesdb:create_ecc', args=args)

        # 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_success_url = reverse_lazy(
            'shared_models:close_me_no_refresh')

        self.expected_view = views.EcaCreate
        self.expected_form = forms.EcaForm
    def setUp(self):
        super().setUp()

        self.data = Factory.EcaFactory.get_valid_data()

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

        obj = Factory.EcaFactory(eca_hydrophone=eca_hydrophone)

        self.test_url = reverse_lazy('whalesdb:update_eca', 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.EmmUpdate

        self.expected_form = forms.EmmForm

        self.expected_success_url = reverse_lazy("whalesdb:details_eca",
                                                 args=(obj.pk, ))