~ubuntu-branches/ubuntu/trusty/horizon/trusty-updates

« back to all changes in this revision

Viewing changes to openstack_dashboard/test/api_tests/lbaas_tests.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2013-12-05 14:39:15 UTC
  • mfrom: (1.1.35)
  • Revision ID: package-import@ubuntu.com-20131205143915-40991ba69inywk0u
Tags: 1:2014.1~b1-0ubuntu1
* New upstream release.
* debian/control: open icehouse release.
* debian/static/openstack-dashboard: Refreshed static assets.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
        ret_val = api.lbaas.vip_create(self.request, **form_data)
46
46
        self.assertIsInstance(ret_val, api.lbaas.Vip)
47
47
 
 
48
    @test.create_stubs({neutronclient: ('create_vip',)})
 
49
    def test_vip_create_skip_address_if_empty(self):
 
50
        vip1 = self.api_vips.first()
 
51
        vipform_data = {'name': vip1['name'],
 
52
                        'description': vip1['description'],
 
53
                        'subnet_id': vip1['subnet_id'],
 
54
                        'protocol_port': vip1['protocol_port'],
 
55
                        'protocol': vip1['protocol'],
 
56
                        'pool_id': vip1['pool_id'],
 
57
                        'session_persistence': vip1['session_persistence'],
 
58
                        'connection_limit': vip1['connection_limit'],
 
59
                        'admin_state_up': vip1['admin_state_up']
 
60
                        }
 
61
 
 
62
        neutronclient.create_vip({'vip': vipform_data}).AndReturn(vipform_data)
 
63
        self.mox.ReplayAll()
 
64
 
 
65
        form_data = dict(vipform_data)
 
66
        form_data['address'] = ""
 
67
        ret_val = api.lbaas.vip_create(self.request, **form_data)
 
68
        self.assertIsInstance(ret_val, api.lbaas.Vip)
 
69
 
48
70
    @test.create_stubs({neutronclient: ('list_vips',)})
49
71
    def test_vips_get(self):
50
72
        vips = {'vips': [{'id': 'abcdef-c3eb-4fee-9763-12de3338041e',