Skip to content

Commit e54e84b

Browse files
committed
Separate QiitaArticle and GitHubArticle
1 parent 65eb8dc commit e54e84b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/test_qiita_sync.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ def genGetLocalLink(self, source: str) -> Callable[[str], str]:
127127
asset.filepath, os.path.dirname(source))).getOrElse(target)
128128

129129
def getGlobalMarkdownLink(self, _target: str):
130-
return Maybe(self.asset_dict.get(_target)).optionalMap(lambda target: GitHubArticle.fromFile(
131-
Path(self.qsync.git_dir).joinpath(target.filepath)).data.id).map(
130+
return Maybe(self.asset_dict.get(_target)).optionalMap(
131+
lambda target: GitHubArticle.fromFile(Path(self.qsync.git_dir).joinpath(target.filepath)).data.id).map(
132132
self.qsync.getQiitaUrl).getOrElse(_target)
133133

134134
def getGlobalImageLink(self, filename: str):
@@ -217,7 +217,7 @@ def test_subcommand_download(topdir_fx: Path, mocker: MockerFixture):
217217

218218

219219
def test_subcommand_check(topdir_fx: Path, mocker: MockerFixture, capsys: CaptureFixture):
220-
get_qsync([MarkdownAsset("md2.md", gen_md2), MarkdownAsset("md3.md", gen_md3), Asset("img1.png")])
220+
get_qsync([MarkdownAsset("md2.md", gen_md2), MarkdownAsset("md3.md", gen_md3), Asset("img1.png")])
221221
article2 = GitHubArticle.fromFile(topdir_fx.joinpath("md2.md"))
222222
article3 = GitHubArticle.fromFile(topdir_fx.joinpath("md3.md"))
223223

@@ -275,7 +275,7 @@ def test_subcommand_sync(topdir_fx: Path, mocker: MockerFixture, capsys: Capture
275275

276276

277277
def test_subcommand_purge(topdir_fx: Path, mocker: MockerFixture, capsys: CaptureFixture):
278-
get_qsync([MarkdownAsset("md2.md", gen_md2), MarkdownAsset("md3.md", gen_md3), Asset("img1.png")])
278+
get_qsync([MarkdownAsset("md2.md", gen_md2), MarkdownAsset("md3.md", gen_md3), Asset("img1.png")])
279279
target = topdir_fx.joinpath("md2.md")
280280

281281
assert target.is_file()
@@ -615,5 +615,5 @@ def test_QiitaSync_format_conversion(md1, md2, img1, topdir_fx: Path):
615615

616616
assert qsync.toGitHubArticle(qsync.toQiitaArticle(article), md1path).body.lower() ==\
617617
qsync.toGitHubArticle(article, article.filepath).body.lower()
618-
assert qsync.toQiitaArticle(
619-
qsync.toGitHubArticle(article, article.filepath)).body.lower() == qsync.toQiitaArticle(article).body.lower()
618+
assert qsync.toQiitaArticle(qsync.toGitHubArticle(
619+
article, article.filepath)).body.lower() == qsync.toQiitaArticle(article).body.lower()

0 commit comments

Comments
 (0)