|
1 | 1 | """ |
2 | | - SoftLayer.tests.CLI.modules.find_tests |
3 | | - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 2 | + SoftLayer.tests.CLI.modules.search_tests |
| 3 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
4 | 4 |
|
5 | 5 | :license: MIT, see LICENSE for more details. |
6 | 6 | """ |
7 | 7 |
|
8 | 8 | from SoftLayer import testing |
9 | 9 |
|
10 | 10 |
|
11 | | -class FindTests(testing.TestCase): |
| 11 | +class SearchTests(testing.TestCase): |
12 | 12 |
|
13 | 13 | def test_find(self): |
14 | 14 | result = self.run_command(['search', '--types']) |
| 15 | + self.assert_called_with("SoftLayer_Search", "getObjectTypes") |
15 | 16 | self.assert_no_fail(result) |
16 | 17 |
|
17 | 18 | def test_find_advanced(self): |
18 | 19 | result = self.run_command(['search', 'hardware', '--advanced']) |
| 20 | + self.assert_called_with("SoftLayer_Search", "advancedSearch", args=('hardware',)) |
19 | 21 | self.assert_no_fail(result) |
20 | 22 |
|
21 | 23 | def test_no_options(self): |
22 | 24 | result = self.run_command(['search']) |
23 | 25 | self.assertEqual(result.exit_code, 2) |
| 26 | + |
| 27 | + def test_find_single_item(self): |
| 28 | + result = self.run_command(['search', 'test.com']) |
| 29 | + self.assert_no_fail(result) |
| 30 | + self.assert_called_with("SoftLayer_Search", "search", args=('test.com',)) |
0 commit comments