Code Duplication    Length = 19-19 lines in 2 locations

django-data/image/crbanim/tests/test_helpers.py 1 location

@@ 161-179 (lines=19) @@
158
        self.reader.print_line(0)
159
        self.assertLogs(logger=logger, level=logging.DEBUG)
160
161
    def test_check_species(self):
162
        """Test check species method"""
163
164
        # get a country
165
        country = DictCountry.objects.get(label="United Kingdom")
166
167
        check, not_found = self.reader.check_species(country)
168
169
        self.assertTrue(check)
170
        self.assertEqual(len(not_found), 0)
171
172
        # changing species set
173
        DictSpecie.objects.filter(label='Bos taurus').delete()
174
175
        check, not_found = self.reader.check_species(country)
176
177
        # the read species are not included in fixtures
178
        self.assertFalse(check)
179
        self.assertGreater(len(not_found), 0)
180
181
    def test_check_sex(self):
182
        """Test check sex method"""

django-data/image/excel/tests/test_helpers.py 1 location

@@ 74-92 (lines=19) @@
71
        self.check_generator(samples, 3)
72
73
    # TODO: pretty similar to CRBanim - move to a common mixin
74
    def test_check_species(self):
75
        """Test check species method"""
76
77
        # get a country
78
        country = DictCountry.objects.get(label="United Kingdom")
79
80
        check, not_found = self.reader.check_species(country)
81
82
        self.assertTrue(check)
83
        self.assertEqual(len(not_found), 0)
84
85
        # changing species set
86
        DictSpecie.objects.filter(label='Sus scrofa').delete()
87
88
        check, not_found = self.reader.check_species(country)
89
90
        # the read species are not included in fixtures
91
        self.assertFalse(check)
92
        self.assertGreater(len(not_found), 0)
93
94
    # TODO: identical to CRBanim - move to a common mixin
95
    def test_check_sex(self):