Пример #1
0
 def test1_demo(self, mock_demo_main):
     # raise Exception('mock not working')
     basmati_cmd('basmati demo'.split())
     mock_demo_main.assert_called()
Пример #2
0
 def test2_download(self, mock_download_main):
     basmati_cmd('basmati download -d ALL -r as'.split())
     mock_download_main.assert_called_with('ALL', 'as', False)
Пример #3
0
 def test3_download(self, mock_download_main):
     basmati_cmd('basmati download -d ALL -r as --delete-zip'.split())
     mock_download_main.assert_called_with('ALL', 'as', True)
Пример #4
0
 def test1_download_no_args(self):
     # Gobble up stderr.
     with contextlib.redirect_stderr(io.StringIO()), self.assertRaises(SystemExit):
         basmati_cmd('basmati download'.split())
Пример #5
0
 def test3_version_warn(self):
     basmati_cmd('basmati -W version'.split())
Пример #6
0
 def test3_version_bw(self):
     basmati_cmd('basmati -B version'.split())
Пример #7
0
 def test2_version_debug(self):
     basmati_cmd('basmati -D version'.split())
Пример #8
0
 def test1_version(self):
     basmati_cmd('basmati version'.split())