Skip to content

Commit 9cc935a

Browse files
committed
add tests
1 parent b5f9c0e commit 9cc935a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

qiita_client/tests/test_plugin.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,23 @@ def func(a, b, c, d):
7373
self.exp_opt, self.exp_out, self.exp_dflt)
7474
self.assertEqual(obs('a', 'b', 'c', 'd'), 42)
7575

76+
def test__push_artifacts_files_to_central(self):
77+
class fakeClient():
78+
def push_file_to_central(self, fp):
79+
return 'pushed:%s' % fp
80+
81+
obs = QiitaCommand._push_artifacts_files_to_central(
82+
fakeClient(), [
83+
ArtifactInfo("stefArtiName", "Atype", [
84+
("fp1", "preprocessed_fasta"),
85+
("fp2", "preprocessed_fastq")]),
86+
None,
87+
ArtifactInfo("artiName", "artiType", [])])
88+
89+
self.assertIn('pushed:', obs[0].files[0][0])
90+
self.assertIn('pushed:', obs[0].files[1][0])
91+
self.assertEqual([], obs[2].files)
92+
7693

7794
class QiitaArtifactTypeTest(TestCase):
7895
def test_init(self):

0 commit comments

Comments
 (0)