mirror of
https://github.com/status-im/cabot.git
synced 2025-02-25 02:45:16 +00:00
Add test for django polymorphic regression
Django 1.11 introduced a django polymorphic regression, add a test to prevent this creeping back in
This commit is contained in:
parent
5a4f871eaa
commit
c2e1607de4
@ -8,7 +8,7 @@ from datetime import timedelta, date
|
||||
import os
|
||||
import requests
|
||||
from cabot.cabotapp.graphite import parse_metric
|
||||
from cabot.cabotapp.alert import update_alert_plugins
|
||||
from cabot.cabotapp.alert import update_alert_plugins, AlertPlugin
|
||||
from cabot.cabotapp.models import (
|
||||
GraphiteStatusCheck, JenkinsStatusCheck,
|
||||
HttpStatusCheck, ICMPStatusCheck, Service, Instance,
|
||||
@ -197,6 +197,13 @@ def throws_timeout(*args, **kwargs):
|
||||
raise requests.RequestException(u'фиктивная ошибка innit')
|
||||
|
||||
|
||||
class TestPolymorphic(LocalTestCase):
|
||||
def test_polymorphic(self):
|
||||
plugin = AlertPlugin.objects.first()
|
||||
|
||||
self.assertIn(type(plugin), AlertPlugin.__subclasses__())
|
||||
|
||||
|
||||
class TestCheckRun(LocalTestCase):
|
||||
|
||||
def test_calculate_service_status(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user