def createDict(self): if self._details_dict: return self._details_dict self._details_dict = {} # Should be one station loaded from the fixtures stn_1 = Factory.StnFactory() self._details_dict['stn_1'] = stn_1 return self._details_dict
def setUp(self): super().setUp() self.data = Factory.StnFactory.get_valid_data() obj = Factory.StnFactory() self.test_url = reverse_lazy('whalesdb:update_stn', 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.StnUpdate self.expected_form = forms.StnForm self.expected_success_url = reverse_lazy("whalesdb:list_stn")