Merge "Use unicode strings in description fields"
This commit is contained in:
commit
b517887543
@ -197,7 +197,7 @@ class TestCase(base.BaseTestCase):
|
||||
|
||||
blacklist_fixtures = [{
|
||||
'pattern': 'blacklisted.com.',
|
||||
'description': 'This is a comment',
|
||||
'description': u'This is a comment',
|
||||
}, {
|
||||
'pattern': 'blacklisted.net.'
|
||||
}, {
|
||||
@ -206,13 +206,13 @@ class TestCase(base.BaseTestCase):
|
||||
|
||||
pool_fixtures = [
|
||||
{'name': 'Pool-One',
|
||||
'description': 'Pool-One description',
|
||||
'description': u'Pool-One description',
|
||||
'attributes': [{'key': 'scope', 'value': 'public'}],
|
||||
'ns_records': [{'priority': 1, 'hostname': 'ns1.example.org.'},
|
||||
{'priority': 2, 'hostname': 'ns2.example.org.'}]},
|
||||
|
||||
{'name': 'Pool-Two',
|
||||
'description': 'Pool-Two description',
|
||||
'description': u'Pool-Two description',
|
||||
'attributes': [{'key': 'scope', 'value': 'public'}],
|
||||
'ns_records': [{'priority': 1, 'hostname': 'ns1.example.org.'}]},
|
||||
]
|
||||
|
@ -2675,7 +2675,7 @@ class CentralServiceTest(CentralTestCase):
|
||||
blacklist = self.create_blacklist(fixture=0)
|
||||
|
||||
# Update the Object
|
||||
blacklist.description = "New Comment"
|
||||
blacklist.description = u"New Comment"
|
||||
|
||||
# Perform the update
|
||||
self.central_service.update_blacklist(self.admin_context, blacklist)
|
||||
@ -2685,7 +2685,7 @@ class CentralServiceTest(CentralTestCase):
|
||||
blacklist.id)
|
||||
|
||||
# Verify that the record was updated correctly
|
||||
self.assertEqual("New Comment", blacklist.description)
|
||||
self.assertEqual(u"New Comment", blacklist.description)
|
||||
|
||||
def test_delete_blacklist(self):
|
||||
# Create a blacklisted zone
|
||||
@ -2871,14 +2871,14 @@ class CentralServiceTest(CentralTestCase):
|
||||
pool = self.create_pool(fixture=0)
|
||||
|
||||
# Update and save the pool
|
||||
pool.description = 'New Comment'
|
||||
pool.description = u'New Comment'
|
||||
self.central_service.update_pool(self.admin_context, pool)
|
||||
|
||||
# Fetch the pool
|
||||
pool = self.central_service.get_pool(self.admin_context, pool.id)
|
||||
|
||||
# Verify that the pool was updated correctly
|
||||
self.assertEqual("New Comment", pool.description)
|
||||
self.assertEqual(u"New Comment", pool.description)
|
||||
|
||||
def test_update_pool_add_ns_record(self):
|
||||
# Create a server pool and zone
|
||||
|
@ -1509,7 +1509,7 @@ class StorageTestCase(object):
|
||||
def test_create_tld(self):
|
||||
values = {
|
||||
'name': 'com',
|
||||
'description': 'This is a comment.'
|
||||
'description': u'This is a comment.'
|
||||
}
|
||||
|
||||
result = self.storage.create_tld(
|
||||
@ -1664,7 +1664,7 @@ class StorageTestCase(object):
|
||||
def test_create_blacklist(self):
|
||||
values = {
|
||||
'pattern': "^([A-Za-z0-9_\\-]+\\.)*example\\.com\\.$",
|
||||
'description': "This is a comment."
|
||||
'description': u"This is a comment."
|
||||
}
|
||||
|
||||
result = self.storage.create_blacklist(
|
||||
|
Loading…
Reference in New Issue
Block a user