Code Duplication    Length = 8-8 lines in 2 locations

tests/test_webviews.py 2 locations

@@ 29-36 (lines=8) @@
26
        self.query.copiesOf.assert_called_with(out['image'])
27
        self.assertEqual(self.query.copiesOf(), out['copies'])
28
29
    def test_by_full_location(self):
30
        import niprov.views
31
        self.request.matchdict = {'host':'her','path':('a','b','c')}
32
        out = niprov.views.location(self.request)
33
        self.query.byLocation.assert_called_with('her:/a/b/c')
34
        self.query.copiesOf.assert_called_with(out['image'])
35
        self.assertEqual(self.query.byLocation(), out['image'])
36
        self.assertEqual(self.query.copiesOf(), out['copies'])
37
38
    def test_stats(self):
39
        import niprov.views
@@ 20-27 (lines=8) @@
17
        out = niprov.views.latest(self.request)
18
        self.assertEqual(self.repo.latest(), out['images'])
19
20
    def test_by_id(self):
21
        import niprov.views
22
        self.request.matchdict = {'id':'1a2b3c'}
23
        out = niprov.views.short(self.request)
24
        self.repo.byId.assert_called_with('1a2b3c')
25
        self.assertEqual(self.repo.byId(), out['image'])
26
        self.query.copiesOf.assert_called_with(out['image'])
27
        self.assertEqual(self.query.copiesOf(), out['copies'])
28
29
    def test_by_full_location(self):
30
        import niprov.views