Esempio n. 1
0
 def test_is_my_url():
     assert not HistmagSource.is_my_url('http://example.com')
     assert HistmagSource.is_my_url(
         'http://histmag.org/Niech-zyje-car-Wladyslaw-Zygmuntowicz-Cz.-3-Upadek-planow-hetmana-8449'
     )
     assert HistmagSource.is_my_url(
         'https://histmag.org/czy-powstanie-listopadowe-bylo-skazane-na-porazke-13520'
     )
Esempio n. 2
0
    def test_extend_url():
        assert HistmagSource.extend_url(
            'http://histmag.org/Niech-zyje-car-Wladyslaw-Zygmuntowicz-Cz.-3-Upadek-planow-hetmana-8449'
        ) == 'http://histmag.org/Niech-zyje-car-Wladyslaw-Zygmuntowicz-Cz.-3-Upadek-planow-hetmana-8449'

        assert HistmagSource.extend_url(
            'http://histmag.org/Margaret-Thatcher-tajfun-reform-7896'
        ) == 'http://histmag.org/Margaret-Thatcher-tajfun-reform-7896'

        assert HistmagSource.extend_url(
            'http://histmag.org/zmarl-prof-janusz-tazbir-13257?newsletter=true'
        ) == 'http://histmag.org/zmarl-prof-janusz-tazbir-13257'

        assert HistmagSource.extend_url(
            'https://histmag.org/Prawdziwy-powod-wybuchu-I-wojny-swiatowej-9648?ciekawostka'
        ) == 'https://histmag.org/Prawdziwy-powod-wybuchu-I-wojny-swiatowej-9648'
Esempio n. 3
0
    def test_extend_url():
        assert HistmagSource.extend_url(
            'http://histmag.org/Niech-zyje-car-Wladyslaw-Zygmuntowicz-Cz.-3-Upadek-planow-hetmana-8449'
        ) == 'http://histmag.org/Niech-zyje-car-Wladyslaw-Zygmuntowicz-Cz.-3-Upadek-planow-hetmana-8449'

        assert HistmagSource.extend_url(
            'http://histmag.org/Margaret-Thatcher-tajfun-reform-7896'
        ) == 'http://histmag.org/Margaret-Thatcher-tajfun-reform-7896'

        assert HistmagSource.extend_url(
            'http://histmag.org/zmarl-prof-janusz-tazbir-13257?newsletter=true'
        ) == 'http://histmag.org/zmarl-prof-janusz-tazbir-13257'

        assert HistmagSource.extend_url(
            'https://histmag.org/Prawdziwy-powod-wybuchu-I-wojny-swiatowej-9648?ciekawostka'
        ) == 'https://histmag.org/Prawdziwy-powod-wybuchu-I-wojny-swiatowej-9648'
Esempio n. 4
0
 def test_is_my_url():
     assert not HistmagSource.is_my_url('http://example.com')
     assert HistmagSource.is_my_url(
         'http://histmag.org/Niech-zyje-car-Wladyslaw-Zygmuntowicz-Cz.-3-Upadek-planow-hetmana-8449')
     assert HistmagSource.is_my_url(
         'https://histmag.org/czy-powstanie-listopadowe-bylo-skazane-na-porazke-13520')