File: test_names.py

package info (click to toggle)
python-datacache 1.4.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 284 kB
  • sloc: python: 935; sh: 14; makefile: 4
file content (16 lines) | stat: -rw-r--r-- 567 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from datacache import build_local_filename

def test_url_without_filename():
    filename = build_local_filename(download_url="http://www.google.com/")
    assert filename
    assert "google" in filename

def notest_multiple_domains_same_file():
    filename_google = build_local_filename(
        download_url="http://www.google.com/index.html")
    filename_yahoo = build_local_filename(
        download_url="http://www.yahoo.com/index.html")

    assert "index" in filename_google
    assert "index" in filename_yahoo
    assert filename_yahoo != filename_google