Пример #1
0
 def test_new_tab(self):
     opts = parse_command_line(['-t', '-r'])
     cmd = open_browser_cmd(opts)
     self.assertEqual(cmd.args, (self.URL,))
     self.assertEqual(cmd.keywords, {'new': 2, 'autoraise': True})
Пример #2
0
 def test_raise_current_window(self):
     opts = parse_command_line(['-b', '-r'])
     cmd = open_browser_cmd(opts)
     self.assertEqual(cmd.args, (self.URL,))
     self.assertEqual(cmd.keywords, {'new': 0, 'autoraise': True})
Пример #3
0
 def test_new_window(self):
     opts = parse_command_line(['-w'])
     cmd = open_browser_cmd(opts)
     self.assertEqual(cmd.args, (self.URL,))
     self.assertEqual(cmd.keywords, {'new': 1, 'autoraise': False})
Пример #4
0
 def test_nothing(self):
     opts = parse_command_line([])
     cmd = open_browser_cmd(opts)
     self.assertIsNone(cmd)