Code Duplication    Length = 18-19 lines in 2 locations

django-data/image/cryoweb/tests/test_helpers.py 2 locations

@@ 405-423 (lines=19) @@
402
        'language/speciesynonym'
403
    ]
404
405
    def test_cryoweb_import(self):
406
        """Import from cryoweb staging database into UID, anche check that
407
        validationsummary is correct"""
408
409
        self.assertTrue(cryoweb_import(self.submission))
410
411
        # test if data were loaded
412
        self.check_data_imported()
413
414
        # check async message called
415
        message = 'Loaded'
416
        notification_message = (
417
            'Cryoweb import completed for submission: 1')
418
        validation_message = {
419
            'animals': 3, 'samples': 1,
420
            'animal_unkn': 3, 'sample_unkn': 1,
421
            'animal_issues': 0, 'sample_issues': 0}
422
423
        self.check_message(message, notification_message, validation_message)
424
@@ 347-364 (lines=18) @@
344
        self.assertEqual(
345
            settings.DATABASES['cryoweb']['NAME'], 'test_cryoweb')
346
347
    def test_cryoweb_import(self):
348
        """Import from cryoweb staging database into UID"""
349
350
        self.assertTrue(cryoweb_import(self.submission))
351
352
        # test if data were loaded
353
        self.check_data_imported()
354
355
        # check async message called
356
        message = 'Loaded'
357
        notification_message = (
358
            'Cryoweb import completed for submission: 1')
359
        validation_message = {
360
            'animals': 3, 'samples': 1,
361
            'animal_unkn': 3, 'sample_unkn': 1,
362
            'animal_issues': 0, 'sample_issues': 0}
363
364
        self.check_message(message, notification_message, validation_message)
365
366
    @patch("cryoweb.helpers.check_UID", side_effect=Exception("Test message"))
367
    def test_cryoweb_import_errors(self, my_check):