File: summary_tests.py

package info (click to toggle)
python-softlayer 6.2.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,508 kB
  • sloc: python: 57,195; makefile: 133; xml: 97; sh: 59
file content (29 lines) | stat: -rw-r--r-- 666 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""
    SoftLayer.tests.CLI.modules.summary_tests
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    :license: MIT, see LICENSE for more details.
"""
from SoftLayer import testing

import json


class SummaryTests(testing.TestCase):

    def test_summary(self):
        result = self.run_command(['summary'])

        expected = [
            {
                'datacenter': 'dal00',
                'subnets': 0,
                'hardware': 1,
                'public_ips': 6,
                'virtual_servers': 1,
                'vlans': 3
            }
        ]

        self.assert_no_fail(result)
        self.assertEqual(json.loads(result.output), expected)