Skip to content

Commit 8ba7189

Browse files
committed
Added template tests for main() function tests of request command
1 parent 07dfc8b commit 8ba7189

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

tests/helpers.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,11 @@ def main_fork(self, repo, rc=0, args={}):
156156
}, args)), "Non {} result for fork".format(rc)
157157
return RepositoryService._current._did_fork
158158

159+
def main_request_list(self, repo, rc=0, args={}):
160+
assert True
161+
162+
def main_request_fetch(self, repo, rc=0, args={}):
163+
assert True
159164
def main_open(self, repo, rc=0, args={}):
160165
os.mkdir(os.path.join(self.tempdir.name, repo.split('/')[-1]))
161166
Repo.init(os.path.join(self.tempdir.name, repo.split('/')[-1]))

tests/integration/test_main.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,17 @@ def test_fork__branch_clone(self):
154154
assert ('guyzmo', 'git-repo') == repo_slug
155155
assert {'branch': 'foobar', 'clone': True} == seen_args
156156

157+
def test_request_list(self):
158+
repo_slug, seen_args = self.main_request_list('guyzmo/git-repo', 0,
159+
args={})
160+
161+
def test_request_fetch__request(self):
162+
repo_slug, seen_args = self.main_request_fetch('guyzmo/git-repo', 0,
163+
args={})
164+
165+
def test_request_fetch__bad_request(self):
166+
repo_slug, seen_args = self.main_request_fetch('guyzmo/git-repo', 0,
167+
args={})
157168
def test_open(self):
158169
repo_slug, seen_args = self.main_open('guyzmo/git-repo', 0)
159170
assert ('guyzmo', 'git-repo') == repo_slug

0 commit comments

Comments
 (0)