コード例 #1
0
ファイル: test_dosage.py プロジェクト: Ruthalas/dosage
 def test_fetch_all_existing(self, tmp_path):
     httpmocks.xkcd()
     xkcd = tmp_path / 'xkcd'
     xkcd.mkdir()
     other = tmp_path / 'randomdir'
     other.mkdir()
     cmd_ok('-v', '-b', str(tmp_path), '@')
     assert len(list(xkcd.glob('*'))) == 2
     assert len(list(other.glob('*'))) == 0
コード例 #2
0
ファイル: test_dosage.py プロジェクト: mikl/dosage
 def test_fetch_indexed(self, tmpdir):
     httpmocks.xkcd()
     cmd_ok("-n", "2", "-v", "-b", str(tmpdir), "xkcd:303")
コード例 #3
0
ファイル: test_dosage.py プロジェクト: mikl/dosage
 def test_fetch_html_and_rss_json(self, tmpdir):
     httpmocks.xkcd()
     cmd_ok("-n", "2", "-v", "-b", str(tmpdir), "-o", "html", "-o", "rss",
            "-o", "json", "xkcd")
コード例 #4
0
ファイル: test_dosage.py プロジェクト: DirkReiners/dosage
 def test_fetch_indexed(self, tmpdir):
     httpmocks.xkcd()
     cmd_ok("-n", "2", "-v", "-b", str(tmpdir), "xkcd:303")
コード例 #5
0
ファイル: test_dosage.py プロジェクト: DirkReiners/dosage
 def test_fetch_html_and_rss_json(self, tmpdir):
     httpmocks.xkcd()
     cmd_ok("-n", "2", "-v", "-b", str(tmpdir), "-o", "html", "-o", "rss",
            "-o", "json", "xkcd")