Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1384 from xliiv/fix/missing-default-pool
Fixed getting name of default pool for vserv.
- Loading branch information
Showing
2 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from __future__ import absolute_import | ||
from __future__ import division | ||
from __future__ import print_function | ||
from __future__ import unicode_literals | ||
|
||
from django.test import TestCase | ||
|
||
from ralph.discovery.tests.util import ( | ||
DeviceFactory, | ||
LoadBalancerVirtualServerFactory, | ||
) | ||
from ralph.ui.views.common import _get_balancers | ||
|
||
|
||
class TestAddresses(TestCase): | ||
|
||
def test_got_balancers_when_no_default_pool(self): | ||
lbvs = LoadBalancerVirtualServerFactory() | ||
self.assertIsNone(lbvs.default_pool) | ||
balancers = list(_get_balancers(lbvs.device)) | ||
self.assertIsNone(balancers[0]['pool']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters