summaryrefslogtreecommitdiff
path: root/tests/test_zone.py
Commit message (Collapse)AuthorAgeFilesLines
* more zone test coverageBob Halley2020-06-181-0/+27
|
* test bad class in zoneBob Halley2020-06-171-0/+5
|
* improve coverageBob Halley2020-06-171-0/+88
|
* some IDNA 2008 tests were not getting skipped if idna was not availableBob Halley2020-06-171-0/+3
|
* attempt to fix the last windows errorBob Halley2020-06-151-1/+1
|
* compare files in a way that avoids newlines issues on windows and gives ↵Bob Halley2020-06-151-19/+27
| | | | better error results
* print out more if file comparison failsBob Halley2020-06-151-0/+11
|
* IDNA support for zones, messages, names in rdata, rrsets, and rdatasets.Bob Halley2020-05-031-0/+27
|
* zone.to_text() should return a string.Brian Wellington2020-03-201-2/+2
| | | | | | As part of the Python 3 conversion, the result of dns.zone.to_text() changed from str to bytes. This was likely unintentional, as a method with text in its name should be returning text.
* Remove choose_relativity() from zone.from_xfr()Brian Wellington2020-03-181-0/+33
| | | | | | | | | | The comment states that relativize must be consistent between dns.query.xfr() and dns.zone.from_xfr(), and the code fails if they're not (if check_origin is True, at least). This means that the rdata is already correctly relativized (or not). This also adds a test of creating zones from xfrs, both relativized and not.
* Improve assertion checking.Brian Wellington2020-03-181-32/+32
| | | | | This replaces lots of self.assertTrue() assertions with more specific assertions, such as replacing assertTrue(x == y) with assertEqual(x, y).
* TST: fix failUnlessRaises -> assertRaises deprecationThomas A Caswell2019-10-301-9/+9
| | | | failUnlessRaises was deprecated in py31
* TST: fix unittest deprecationThomas A Caswell2019-10-301-42/+42
| | | | failUnless was deprecated in py31
* remove the rest of the unicode string prefixesBob Halley2019-01-081-1/+1
|
* update copyrightBob Halley2018-12-011-0/+2
|
* Initial type signaturesJanus2018-07-311-73/+73
|
* Improve TTL detection when reading master zone files.Tom Lanyon2017-05-311-3/+59
| | | | | | | | | | | | | | | | | | | | This introduces the same behaviour that BIND has when it encounters implicit TTL values, namely: * The $TTL directive is preferred to set the default TTL [RFC2308]. * If no $TTL directive is seen prior to the SOA RR, the default TTL is set to the minimum TTL field of the SOA RR [RFC1033, RFC1035, RFC1912]. * If neither $TTL nor an SOA are present, use the last seen explicit TTL on an RR or raise a SyntaxError if no explicit TTLs have been seen. Previously, when neither $TTL nor SOA were present, the TTL for an RR without an explicit TTL would be set to 0 which is known to be a somewhat dangerous value and shouldn't be encouraged as a default. One test seems to rely on this default TTL=0 behaviour whilst testing something seemingly unrelated (RR starting with whitespace), so that test has been updated to match this new expectation. Fixes #254.
* Test creates file in wrong locationAvram Lubkin2016-10-041-1/+1
| | | test_zone.ZoneTestCase.testToFileFilename fails with OSError: [Errno 2] No such file or directory
* Merge pull request #197 from bastiak/pylintBob Halley2016-09-181-15/+12
|\ | | | | Pylint
| * Pylint: remove unused variablesMartin2016-08-311-15/+12
| | | | | | | | This commit removes some unused variables (except those in iterations, list comprehensions and used for unpacking)
* | Add zone.to_file testsMartin2016-08-311-0/+53
|/ | | | Test covers both binary and textual mode for files and streams
* Pylint: tests: Fix whitespace errorsMartin2016-07-021-1/+1
|
* Pylint: tests: fix singleton comparisonMartin2016-07-021-5/+5
|
* Fix typosJakub Wilk2016-05-261-1/+1
|
* Allow an origin of None to be specified when constructing aBob Halley2016-05-111-0/+3
| | | | | Zone object. [issue #153]
* Allow zone origin to be specified as a string.Bob Halley2016-05-081-0/+11
|
* python3 supportArthur Gautier2016-04-211-26/+37
| | | | Signed-off-by: Arthur Gautier <baloo@gandi.net>
* Adds tox and coverage.pyArthur Gautier2016-04-211-1/+4
| | | | Signed-off-by: Arthur Gautier <baloo@gandi.net>
* Add dns.zone.to_text() convenience method.Bob Halley2014-06-211-0/+14
| | | | Thanks to Brandon Whaley <redkrieg@gmail.com> for the patch.
* Fix exception when reading from a masterfile.Bob Halley2014-06-211-1/+10
| | | | | | | When reading from a masterfile, if the first content line started with leading whitespace, we raised an ugly exception instead of doing the right thing, namely using the zone origin as the name. [#73]
* overhaul test systemBob Halley2014-05-311-0/+389