Code Duplication    Length = 18-20 lines in 2 locations

tests/test_pylast.py 2 locations

@@ 1896-1915 (lines=20) @@
1893
        self.assertIsInstance(tracks[0], pylast.Track)
1894
        self.assertEqual(len(tracks), 4)
1895
1896
    @handle_lastfm_exceptions
1897
    def test_tags(self):
1898
        # Arrange
1899
        tag1 = self.network.get_tag("blues")
1900
        tag2 = self.network.get_tag("rock")
1901
1902
        # Act
1903
        tag_repr = repr(tag1)
1904
        tag_str = str(tag1)
1905
        name = tag1.get_name(properly_capitalized=True)
1906
        url = tag1.get_url()
1907
1908
        # Assert
1909
        self.assertEqual("blues", tag_str)
1910
        self.assertIn("pylast.Tag", tag_repr)
1911
        self.assertIn("blues", tag_repr)
1912
        self.assertEqual("blues", name)
1913
        self.assertTrue(tag1 == tag1)
1914
        self.assertTrue(tag1 != tag2)
1915
        self.assertEqual(url, "http://www.last.fm/tag/blues")
1916
1917
    @handle_lastfm_exceptions
1918
    def test_tags_similar(self):
@@ 1993-2010 (lines=18) @@
1990
        self.assertGreater(review_count, 0)
1991
        self.assertGreater(attendance_count, 100)
1992
1993
    @handle_lastfm_exceptions
1994
    def test_countries(self):
1995
        # Arrange
1996
        country1 = pylast.Country("Italy", self.network)
1997
        country2 = pylast.Country("Finland", self.network)
1998
1999
        # Act
2000
        text = str(country1)
2001
        rep = repr(country1)
2002
        url = country1.get_url()
2003
2004
        # Assert
2005
        self.assertIn("Italy", rep)
2006
        self.assertIn("pylast.Country", rep)
2007
        self.assertEqual(text, "Italy")
2008
        self.assertTrue(country1 == country1)
2009
        self.assertTrue(country1 != country2)
2010
        self.assertEqual(url, "http://www.last.fm/place/italy")
2011
2012
    @handle_lastfm_exceptions
2013
    def test_track_eq_none_is_false(self):