Skip to content
Snippets Groups Projects
Commit 3876b5c3 authored by Bryan BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

improve coverage

parent 5f44b381
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@ from django.test import TestCase
from django.utils import timezone
from viralhostrangedb import business_process, models
from viralhostrangedb.business_process import extract_name_and_identifiers, ImportationObserver
from viralhostrangedb.business_process import extract_name_and_identifiers, ImportationObserver, DataSourceAlteredData
from viralhostrangedb.tests.test_views_others import ViewTestCase
logger = logging.getLogger(__name__)
......@@ -669,6 +669,15 @@ class TestOthers(TestCase):
self.assertEqual(name, expected_name)
self.assertDictEqual(identifiers, expected_both_identifier_dict)
def test_backup_data_source(self):
self.assertRaises(
AssertionError,
business_process.backup_data_source,
user=None,
data_source=None,
altered_data=DataSourceAlteredData.ALL,
)
class TestNCBIIdentifierStatus(TestCase):
def test_biopython_ok(self):
......
import logging
from django.test import TestCase
from viralhostrangedb import business_process
logger = logging.getLogger(__name__)
class OnlyForCoverage(TestCase):
def test_ImportationObserver(self):
class MyImportationObserver(business_process.ImportationObserver):
def notify_host_error(self, *args, **kwargs):
super().notify_host_error(*args, **kwargs)
def notify_virus_error(self, *args, **kwargs):
super().notify_virus_error(*args, **kwargs)
MyImportationObserver().notify_host_error(None, None)
MyImportationObserver().notify_virus_error(None, None)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment