Adds unit tests for char create and delete, fixes bugs.

This commit is contained in:
Johnny 2018-10-24 00:02:26 +00:00
parent 48b62a258a
commit 21972dac31
3 changed files with 28 additions and 2 deletions

View file

@ -345,11 +345,12 @@ class CharacterUpdateView(CharacterMixin, ObjectUpdateView):
template_name = 'website/character_form.html'
class CharacterDeleteView(CharacterMixin, ObjectDeleteView):
pass
success_url = reverse_lazy('character-manage')
class CharacterCreateView(CharacterMixin, ObjectCreateView):
template_name = 'website/character_form.html'
success_url = reverse_lazy('character-manage')
def form_valid(self, form):
# Get account ref