diff options
author | Michael Johnson <johnsomor@gmail.com> | 2023-02-13 21:07:15 +0000 |
---|---|---|
committer | Michael Johnson <johnsomor@gmail.com> | 2023-02-13 21:08:15 +0000 |
commit | 34292ee649e038631b39fb6bb969a83e6e901ff1 (patch) | |
tree | 255128bd507b693ab2b10e0370079846bfb8473c /designateclient/functionaltests | |
parent | 483e0d16c6b357a610634ad5f7db9ab61b41d353 (diff) | |
download | python-designateclient-34292ee649e038631b39fb6bb969a83e6e901ff1.tar.gz |
Add hacking check for line continuation backslash
This patch adds a hacking check for line continuation backslashes and fixes the occurences that existed in the code.
Change-Id: I13cd03e16698b7f1d8036815d12a665bd1156f2f
Diffstat (limited to 'designateclient/functionaltests')
-rw-r--r-- | designateclient/functionaltests/datagen.py | 17 | ||||
-rw-r--r-- | designateclient/functionaltests/v2/test_recordsets.py | 6 |
2 files changed, 12 insertions, 11 deletions
diff --git a/designateclient/functionaltests/datagen.py b/designateclient/functionaltests/datagen.py index aaa555f..3aea79d 100644 --- a/designateclient/functionaltests/datagen.py +++ b/designateclient/functionaltests/datagen.py @@ -46,11 +46,12 @@ def random_blacklist(name='testblacklist'): def random_zone_file(name='testzoneimport'): - return "$ORIGIN {0}{1}.com.\n" \ - "$TTL 300\n" \ - "{0}{1}.com. 300 IN SOA ns.{0}{1}.com. " \ - "nsadmin.{0}{1}.com. 42 42 42 42 42\n" \ - "{0}{1}.com. 300 IN NS ns.{0}{1}.com.\n" \ - "{0}{1}.com. 300 IN MX 10 mail.{0}{1}.com.\n" \ - "ns.{0}{1}.com. 300 IN A 10.0.0.1\n" \ - "mail.{0}{1}.com. 300 IN A 10.0.0.2\n".format(name, random_digits()) + return ("$ORIGIN {0}{1}.com.\n" + "$TTL 300\n" + "{0}{1}.com. 300 IN SOA ns.{0}{1}.com. " + "nsadmin.{0}{1}.com. 42 42 42 42 42\n" + "{0}{1}.com. 300 IN NS ns.{0}{1}.com.\n" + "{0}{1}.com. 300 IN MX 10 mail.{0}{1}.com.\n" + "ns.{0}{1}.com. 300 IN A 10.0.0.1\n" + "mail.{0}{1}.com. 300 IN A 10.0.0.2\n".format(name, + random_digits())) diff --git a/designateclient/functionaltests/v2/test_recordsets.py b/designateclient/functionaltests/v2/test_recordsets.py index c9ab529..419d03c 100644 --- a/designateclient/functionaltests/v2/test_recordsets.py +++ b/designateclient/functionaltests/v2/test_recordsets.py @@ -101,9 +101,9 @@ class TestRecordset(BaseDesignateTest): class TestRecordsetNegative(BaseDesignateTest): def test_invalid_option_on_recordset_create(self): - cmd = 'recordset create de47d30b-41c5-4e38-b2c5-e0b908e19ec7 ' \ - 'aaa.desig.com. --type A --records 1.2.3.4 ' \ - '--invalid "not valid"' + cmd = ('recordset create de47d30b-41c5-4e38-b2c5-e0b908e19ec7 ' + 'aaa.desig.com. --type A --records 1.2.3.4 ' + '--invalid "not valid"') self.assertRaises(CommandFailed, self.clients.openstack, cmd) def test_invalid_recordset_command(self): |