Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Fix test data for notifier test #257

Merged
merged 1 commit into from
Mar 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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