chromite: Remove GetToolset() function.

GetToolset() was used to switch functionality between `cros` and
`brillo`, so is no longer needed.

BUG=chromium:507323
TEST=cbuildbot/run_tests
TEST=cros --help

Change-Id: I652d4e5a2abcf3e318bc0233ae3c53b6b2fd29fb
Reviewed-on: https://chromium-review.googlesource.com/284169
Reviewed-by: David Pursell <dpursell@chromium.org>
Tested-by: David Pursell <dpursell@chromium.org>
Commit-Queue: David Pursell <dpursell@chromium.org>
diff --git a/cli/command_unittest.py b/cli/command_unittest.py
index 9b1ef17..33c0725 100644
--- a/cli/command_unittest.py
+++ b/cli/command_unittest.py
@@ -10,6 +10,7 @@
 import glob
 import os
 
+from chromite.cbuildbot import constants
 from chromite.cli import command
 from chromite.lib import commandline
 from chromite.lib import cros_build_lib_unittest
@@ -61,15 +62,12 @@
     else:
       self.fail('Invalid command was accepted by the CommandDecorator')
 
-  def testCrosAddDeviceArgument(self):
-    """Tests CliCommand.AddDeviceArgument() for `cros`."""
-    self.PatchObject(command, 'GetToolset', return_value='cros')
+  def testAddDeviceArgument(self):
+    """Tests CliCommand.AddDeviceArgument()."""
     parser = argparse.ArgumentParser()
     command.CliCommand.AddDeviceArgument(parser)
-    # cros should have a positional device argument.
+    # Device should be a positional argument.
     parser.parse_args(['device'])
-    with self.assertRaises(SystemExit):
-      parser.parse_args(['--device', 'device'])
 
 
 class MockCommand(partial_mock.PartialMock):
@@ -112,25 +110,25 @@
     self.PatchObject(glob, 'glob',
                      return_value=[fake_command_file, filtered_file])
 
-    self.assertEqual(command._FindModules(mydir, 'cros'), [fake_command_file])
+    self.assertEqual(command._FindModules(mydir), [fake_command_file])
 
   def testLoadCommands(self):
     """Tests import commands correctly."""
     fake_module = 'cros_command_test'
-    fake_command_file = '%s.py' % fake_module
-    module_path = ('chromite', 'cli', 'cros', fake_module)
+    fake_command_file = os.path.join(constants.CHROMITE_DIR, 'foo', fake_module)
+    module_path = ['chromite', 'foo', fake_module]
 
     self.PatchObject(command, '_FindModules', return_value=[fake_command_file])
     # The code doesn't use the return value, so stub it out lazy-like.
     load_mock = self.PatchObject(cros_import, 'ImportModule', return_value=None)
 
-    command._ImportCommands('cros')
+    command._ImportCommands()
 
     load_mock.assert_called_with(module_path)
 
   def testListCrosCommands(self):
     """Tests we get a sane `cros` list back."""
-    cros_commands = command.ListCommands('cros')
+    cros_commands = command.ListCommands()
     # Pick some commands that are likely to not go away.
     self.assertIn('chrome-sdk', cros_commands)
     self.assertIn('flash', cros_commands)