Exemplo n.º 1
0
    def test_single_error(self):
        dw.cleanup_dir()
        res = dw.download_stats(None)

        assert res == None
        save_path = dw.get_saveDir()
        files = os.listdir(save_path)

        assert len(files) == 0
Exemplo n.º 2
0
    def test_all(self):
        dw.cleanup_dir()
        dw.download_all()

        save_path = dw.get_saveDir()
        files = os.listdir(save_path)

        assert len(files) == 8

        for f in files:
            assert 'individual' in f or 'team' in f
Exemplo n.º 3
0
    def test_team(self):
        dw.cleanup_dir()
        dw.download_team_stats()

        save_path = dw.get_saveDir()
        files = os.listdir(save_path)

        assert len(files) == 4

        for f in files:
            assert 'team' in f
Exemplo n.º 4
0
    def test_individual(self):
        dw.cleanup_dir()
        dw.download_single_stats()

        save_path = dw.get_saveDir()
        files = os.listdir(save_path)

        assert len(files) == 4

        for f in files:
            assert 'individual' in f
Exemplo n.º 5
0
    def test_single(self):
        dw.cleanup_dir()
        driver = dw.setup_firefox_opt()
        dw.download_stats(driver)

        save_path = dw.get_saveDir()
        files = os.listdir(save_path)

        assert len(files) == 1
        assert 'individual' in files[0]
        assert 'palka' in files[0]