Repository: softlayer/softlayer-python

Issue:
slcli search doesn't work with simple search
```
$> slcli search test.com
Usage: slcli search [OPTIONS] [QUERY]...


Error: Search query must be provided

```

this should do a basic search for test.com

Discussion:

Solution patch:
diff --git a/SoftLayer/CLI/search.py b/SoftLayer/CLI/search.py
index 23329ce51..84a79ff6e 100644
--- a/SoftLayer/CLI/search.py
+++ b/SoftLayer/CLI/search.py
@@ -37,13 +37,14 @@ def cli(env, query, types, advanced):
         slcli -vvv search _objectType:SoftLayer_Hardware hostname:testibm --advanced
     """
 
-    # Before any Search operation
+    # Checks to make sure we have at least 1 query.
     def check_opt(list_opt=None):
         check = False
         for input_ in list_opt:
-            if input_ is True:
+            if input_:
                 check = True
                 break
+
         return check
 
     list_opt = [query, types, advanced]


Test patch:
diff --git a/tests/CLI/modules/search_tests.py b/tests/CLI/modules/search_tests.py
index c14ce6b84..1b2540779 100644
--- a/tests/CLI/modules/search_tests.py
+++ b/tests/CLI/modules/search_tests.py
@@ -1,6 +1,6 @@
 """
-    SoftLayer.tests.CLI.modules.find_tests
-    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    SoftLayer.tests.CLI.modules.search_tests
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     :license: MIT, see LICENSE for more details.
 """
@@ -8,16 +8,23 @@
 from SoftLayer import testing
 
 
-class FindTests(testing.TestCase):
+class SearchTests(testing.TestCase):
 
     def test_find(self):
         result = self.run_command(['search', '--types'])
+        self.assert_called_with("SoftLayer_Search", "getObjectTypes")
         self.assert_no_fail(result)
 
     def test_find_advanced(self):
         result = self.run_command(['search', 'hardware', '--advanced'])
+        self.assert_called_with("SoftLayer_Search", "advancedSearch", args=('hardware',))
         self.assert_no_fail(result)
 
     def test_no_options(self):
         result = self.run_command(['search'])
         self.assertEqual(result.exit_code, 2)
+
+    def test_find_single_item(self):
+        result = self.run_command(['search', 'test.com'])
+        self.assert_no_fail(result)
+        self.assert_called_with("SoftLayer_Search", "search", args=('test.com',))