Commits

mdelagra committed 5dc2dfe

tests for repoid flag

  • Participants
  • Parent commits 21256da

Comments (0)

Files changed (2)

File mercurial_reviewboard/tests/test_commands.py

     opts = {}
     args = fancyopts.fancyopts(['-U', 'john, jane'], cmdtable['postreview'][1], 
                                opts, True)
-    eq_('john, jane', opts['target_people'])
+    eq_('john, jane', opts['target_people'])
+    
+def test_repoid():
+    opts = {}
+    args = fancyopts.fancyopts(['-i', '101'], cmdtable['postreview'][1], 
+                               opts, True)
+    eq_('101', opts['repoid'])

File mercurial_reviewboard/tests/test_find_reviewboard_repo_id.py

+from nose.tools import eq_
+
+from mercurial_reviewboard import find_reviewboard_repo_id
+from mercurial_reviewboard.tests import get_initial_opts
+
+def test_repo_id_from_opts():
+    opts = get_initial_opts()
+    opts['repoid'] = '101'
+    eq_(101, find_reviewboard_repo_id(None, None, opts))