File: bandwidth_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 (26 lines) | stat: -rw-r--r-- 825 bytes parent folder | download
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
"""
    SoftLayer.tests.managers.bandwidth_tests
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

"""
from SoftLayer.managers.bandwidth import BandwidthManager as BandwidthManager
from SoftLayer import testing


class BandwidthManagerTests(testing.TestCase):

    def set_up(self):
        self.manager = BandwidthManager(self.client)

    def test_get_location_group(self):
        self.manager.get_location_group()
        _filter = {
            "locationGroupTypeId": {
                "operation": 1
            }
        }
        self.assert_called_with('SoftLayer_Location_Group', 'getAllObjects', filter=_filter)

    def test_create_pool(self):
        self.manager.create_pool(name_pool='New region', id_location_group=2)
        self.assert_called_with('SoftLayer_Network_Bandwidth_Version1_Allotment', 'createObject')