Skip to content

Commit

Permalink
[BUGFIX] Fix test data for notifier test #257
Browse files Browse the repository at this point in the history
The test classes were refactored in #243 but this instance was missed
  • Loading branch information
kfdm authored Mar 11, 2020
2 parents 6d8f12f + e6de74b commit e566543
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion promgen/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def test(self):
Uses the same test json from our unittests but subs in the currently
tested object as part of the test data
'''
data = tests.PromgenTest.data_json('examples', 'alertmanager.json')
data = tests.Data("examples", "alertmanager.json").json()
if hasattr(self.content_object, 'name'):
data['commonLabels'][self.content_type.name] = self.content_object.name
for alert in data.get('alerts', []):
Expand Down
2 changes: 1 addition & 1 deletion promgen/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ def get_context_data(self, **kwargs):

def form_valid(self, form):
sender, _ = models.Sender.objects.get_or_create(obj=self.request.user, owner=self.request.user, **form.clean())
return redirect('status')
return redirect('profile')


class HostRegister(LoginRequiredMixin, FormView):
Expand Down

0 comments on commit e566543

Please sign in to comment.