make string.letters python3 compatible

The string.letters in python2 was supported. But in python3,
string.letters was removed. In python3, recommend using
string.ascii_letters instead. This patch fix it.

Change-Id: I7bfe2b94c0c740d9143ddddc655f8086a537f24b
Closes-Bug: #1595786
This commit is contained in:
zhengyao1 2016-06-24 17:04:56 +08:00
parent a2d2d57a46
commit 0c64947c6f

@ -121,7 +121,8 @@ class TestServersDescription(base.ClientTestBase):
def test_update_with_description_longer_than_255_symbols(self):
# Negative case for description longer than 255 characters
server = self._create_server()
descr = ''.join(random.choice(string.letters) for i in range(256))
descr = ''.join(random.choice(string.ascii_letters)
for i in range(256))
output = self.nova("update %s --description '%s'" % (server.id, descr),
fail_ok=True, merge_stderr=True)
self.assertIn("\nERROR (BadRequest): Invalid input for field/attribute"