Description: Add tests from upstream (GitHub - not included in sdist)
 Until upstream includes test in the sdist, we add them this way.
Author: Scott Kitterman <scott@kitterman.com>
Origin: upstream
Forwarded: not-needed
Last-Update: 2020-01-25

--- /dev/null
+++ python-publicsuffix2-2.20191221/tests.py
@@ -0,0 +1,297 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) nexB Inc. and others.
+# This code is based on Tomaž Šolc's fork of David Wilson's code originally at
+# https://www.tablix.org/~avian/git/publicsuffix.git
+#
+# Copyright (c) 2014 Tomaž Šolc <tomaz.solc@tablix.org>
+#
+# David Wilson's code was originally at:
+# from http://code.google.com/p/python-public-suffix-list/
+#
+# Copyright (c) 2009 David Wilson
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+# The Public Suffix List vendored in this distribution has been downloaded
+# from http://publicsuffix.org/public_suffix_list.dat
+# This data file is licensed under the MPL-2.0 license.
+# http://mozilla.org/MPL/2.0/
+
+
+from __future__ import absolute_import
+from __future__ import print_function
+from __future__ import unicode_literals
+
+import unittest
+
+import publicsuffix2 as publicsuffix
+
+
+class TestPublicSuffix(unittest.TestCase):
+
+    def test_get_sld_from_empty_list(self):
+        psl = publicsuffix.PublicSuffixList([])
+        assert 'com' == psl.get_sld('com')
+        assert 'com' == psl.get_sld('COM')
+        assert 'com' == psl.get_sld('.com')
+        assert 'com' == psl.get_sld('a.example.com')
+
+    def test_get_sld_from_empty_list_in_strict_mode(self):
+        psl = publicsuffix.PublicSuffixList([])
+        assert None == psl.get_sld('com', strict=True)
+
+    def test_get_sld_from_list(self):
+        psl = publicsuffix.PublicSuffixList(['com'])
+        assert 'example.com' == psl.get_sld('a.example.com')
+        assert 'example.com' == psl.get_sld('a.a.example.com')
+        assert 'example.com' == psl.get_sld('a.a.a.example.com')
+        assert 'example.com' == psl.get_sld('A.example.com')
+        assert 'example.com' == psl.get_sld('.a.a.example.com')
+
+    def test_get_sld_from_list_with_exception_rule(self):
+        psl = publicsuffix.PublicSuffixList(['*.example.com', '!b.example.com'])
+        assert 'a.example.com' == psl.get_sld('a.example.com')
+        assert 'a.a.example.com' == psl.get_sld('a.a.example.com')
+        assert 'a.a.example.com' == psl.get_sld('a.a.a.example.com')
+        assert 'a.a.example.com' == psl.get_sld('a.a.a.a.example.com')
+
+        assert 'b.example.com' == psl.get_sld('b.example.com')
+        assert 'b.example.com' == psl.get_sld('b.b.example.com')
+        assert 'b.example.com' == psl.get_sld('b.b.b.example.com')
+        assert 'b.example.com' == psl.get_sld('b.b.b.b.example.com')
+
+    def test_get_sld_from_list_with_fqdn(self):
+        psl = publicsuffix.PublicSuffixList(['com'])
+        assert 'example.com' == psl.get_sld('example.com.')
+
+    def test_get_sld_from_list_with_unicode(self):
+        psl = publicsuffix.PublicSuffixList([u'\u0440\u0444'], idna=False)
+        assert u'\u0440\u0444' == psl.get_sld(u'\u0440\u0444')
+        assert u'example.\u0440\u0444' == psl.get_sld(u'example.\u0440\u0444')
+        assert u'example.\u0440\u0444' == psl.get_sld(u'a.example.\u0440\u0444')
+        assert u'example.\u0440\u0444' == psl.get_sld(u'a.a.example.\u0440\u0444')
+
+    def test_get_public_suffix_from_builtin_full_publicsuffix_org_using_top_level_function(self):
+        assert 'com' == publicsuffix.get_public_suffix('COM')
+        assert 'example.com' == publicsuffix.get_public_suffix('example.COM')
+        assert 'example.com' == publicsuffix.get_public_suffix('WwW.example.COM')
+
+
+class TestPublicSuffixUsingTheCurrentVendoredPSL(unittest.TestCase):
+
+    def test_get_sld_from_builtin_full_publicsuffix_org_list_with_mixed_case(self):
+        psl = publicsuffix.PublicSuffixList(None)
+        assert 'com' == psl.get_sld('COM')
+        assert 'example.com' == psl.get_sld('example.COM')
+        assert 'example.com' == psl.get_sld('WwW.example.COM')
+
+    def test_get_sld_from_builtin_full_publicsuffix_org_list_with_leading_dot(self):
+        psl = publicsuffix.PublicSuffixList(None)
+        assert 'com' == psl.get_sld('.com')
+        assert 'example' == psl.get_sld('.example')
+        assert 'example.com' == psl.get_sld('.example.com')
+        assert 'example' == psl.get_sld('.example.example')
+
+    def test_get_sld_from_builtin_full_publicsuffix_org_list_with_unlisted_tld(self):
+        psl = publicsuffix.PublicSuffixList(None)
+        assert 'example' == psl.get_sld('example')
+        assert 'example' == psl.get_sld('example.example')
+        assert 'example' == psl.get_sld('b.example.example')
+        assert 'example' == psl.get_sld('a.b.example.example')
+
+    def test_get_sld_from_builtin_full_publicsuffix_org_list_with_listed_ut_non_internet_tld(self):
+        psl = publicsuffix.PublicSuffixList(None)
+        assert 'local' == psl.get_sld('local')
+        assert 'local' == psl.get_sld('example.local')
+        assert 'local' == psl.get_sld('b.example.local')
+        assert 'local' == psl.get_sld('a.b.example.local')
+
+    def test_get_sld_from_builtin_full_publicsuffix_org_list_with_one_rule(self):
+        psl = publicsuffix.PublicSuffixList(None)
+        assert 'biz' == psl.get_sld('biz')
+        assert 'domain.biz' == psl.get_sld('domain.biz')
+        assert 'domain.biz' == psl.get_sld('b.domain.biz')
+        assert 'domain.biz' == psl.get_sld('a.b.domain.biz')
+
+    def test_get_sld_from_builtin_full_publicsuffix_org_list_with_two_level_rules(self):
+        psl = publicsuffix.PublicSuffixList(None)
+        assert 'com' == psl.get_sld('com')
+        assert 'example.com' == psl.get_sld('example.com')
+        assert 'example.com' == psl.get_sld('b.example.com')
+        assert 'example.com' == psl.get_sld('a.b.example.com')
+
+    def test_get_sld_from_builtin_full_publicsuffix_org_list_with_two_level_uk_rules(self):
+        psl = publicsuffix.PublicSuffixList(None)
+        assert 'uk.com' == psl.get_sld('uk.com')
+        assert 'example.uk.com' == psl.get_sld('example.uk.com')
+        assert 'example.uk.com' == psl.get_sld('b.example.uk.com')
+        assert 'example.uk.com' == psl.get_sld('a.b.example.uk.com')
+        assert 'test.ac' == psl.get_sld('test.ac')
+
+    def test_get_sld_from_builtin_full_publicsuffix_org_list_with_wildcard_rule(self):
+        psl = publicsuffix.PublicSuffixList(None)
+        assert 'er' == psl.get_sld('er')
+        assert 'c.er' == psl.get_sld('c.er')
+        assert 'b.c.er' == psl.get_sld('b.c.er')
+        assert 'b.c.er' == psl.get_sld('a.b.c.er')
+
+    def test_get_sld_from_builtin_full_publicsuffix_org_list_with_japanese_domain(self):
+        psl = publicsuffix.PublicSuffixList(None)
+        assert 'jp' == psl.get_sld('jp')
+        assert 'test.jp' == psl.get_sld('test.jp')
+        assert 'test.jp' == psl.get_sld('www.test.jp')
+        assert 'ac.jp' == psl.get_sld('ac.jp')
+        assert 'test.ac.jp' == psl.get_sld('test.ac.jp')
+        assert 'test.ac.jp' == psl.get_sld('www.test.ac.jp')
+        assert 'kobe.jp' == psl.get_sld('kobe.jp')
+        assert 'c.kobe.jp' == psl.get_sld('c.kobe.jp')
+        assert 'b.c.kobe.jp' == psl.get_sld('b.c.kobe.jp')
+        assert 'b.c.kobe.jp' == psl.get_sld('a.b.c.kobe.jp')
+
+    def test_get_sld_from_builtin_full_publicsuffix_org_list_with_japanese_domain_exception_rule(self):
+        psl = publicsuffix.PublicSuffixList(None)
+        assert 'city.kobe.jp' == psl.get_sld('city.kobe.jp')
+        assert 'city.kobe.jp' == psl.get_sld('www.city.kobe.jp')
+
+    def test_get_sld_from_builtin_full_publicsuffix_org_list_with_ys(self):
+        psl = publicsuffix.PublicSuffixList(None)
+        assert 'us' == psl.get_sld('us')
+        assert 'test.us' == psl.get_sld('test.us')
+        assert 'test.us' == psl.get_sld('www.test.us')
+
+    def test_get_sld_from_builtin_full_publicsuffix_org_list_with_us_k12(self):
+        psl = publicsuffix.PublicSuffixList(None)
+        assert 'ak.us' == psl.get_sld('ak.us')
+        assert 'test.ak.us' == psl.get_sld('test.ak.us')
+        assert 'test.ak.us' == psl.get_sld('www.test.ak.us')
+        assert 'k12.ak.us' == psl.get_sld('k12.ak.us')
+        assert 'test.k12.ak.us' == psl.get_sld('test.k12.ak.us')
+        assert 'test.k12.ak.us' == psl.get_sld('www.test.k12.ak.us')
+
+
+class TestPublicSuffixGetSldIdna(unittest.TestCase):
+
+    def test_get_sld_idna_encoded(self):
+        # actually the default
+        psl = publicsuffix.PublicSuffixList(idna=True)
+        assert 'xn--85x722f.com.cn' == psl.get_sld('xn--85x722f.com.cn')
+        assert 'xn--85x722f.xn--55qx5d.cn' == psl.get_sld('xn--85x722f.xn--55qx5d.cn')
+        assert 'xn--85x722f.xn--55qx5d.cn' == psl.get_sld('www.xn--85x722f.xn--55qx5d.cn')
+        assert 'shishi.xn--55qx5d.cn' == psl.get_sld('shishi.xn--55qx5d.cn')
+
+    def test_get_sld_with_utf8_encoded(self):
+        # uses the list provided utf-8 defaults
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert u'食狮.com.cn' == psl.get_sld(u'食狮.com.cn')
+        assert u'食狮.公司.cn' == psl.get_sld(u'食狮.公司.cn')
+        assert u'食狮.公司.cn' == psl.get_sld(u'www.食狮.公司.cn')
+        assert u'shishi.公司.cn' == psl.get_sld(u'shishi.公司.cn')
+
+    def test_get_sld_exceptions(self):
+        psl = publicsuffix.PublicSuffixList()
+        # www is the exception
+        assert 'www.ck' == psl.get_sld('www.www.ck')
+        assert 'this.that.ck' == psl.get_sld('this.that.ck')
+
+    def test_get_sld_no_wildcard(self):
+        psl = publicsuffix.PublicSuffixList()
+        # test completion when no wildcards should be processed
+        assert 'com.pg' == psl.get_sld('telinet.com.pg', wildcard=False)
+        expected = 'ap-southeast-1.elb.amazonaws.com'
+        result = psl.get_sld('blah.ap-southeast-1.elb.amazonaws.com', wildcard=False)
+        assert expected == result
+
+    def test_get_sld_top_convenience_function_is_the_same_as_PublicSuffixList_method(self):
+        psl = publicsuffix.PublicSuffixList()
+        # these functions should be identical
+        assert psl.get_sld('www.google.com') == publicsuffix.get_sld('www.google.com')
+        assert psl.get_sld('www.test.ak.us') == publicsuffix.get_sld('www.test.ak.us')
+
+    def test_get_tld_returns_correct_tld_or_etld(self):
+        psl = publicsuffix.PublicSuffixList()
+        assert 'com' == psl.get_tld('com')
+        assert 'kobe.jp' == psl.get_tld('city.kobe.jp')
+        assert 'kobe.jp' == psl.get_tld('kobe.jp')
+        assert 'amazonaws.com' == psl.get_tld('amazonaws.com')
+        assert 'com.pg' == psl.get_tld('telinet.com.pg', wildcard=True)
+        assert 'pg' == psl.get_tld('telinet.com.pg', wildcard=False)
+        assert 'com.pg' == psl.get_tld('com.pg', wildcard=True)
+        assert 'pg' == psl.get_tld('com.pg', wildcard=False)
+        assert 'co.uk' == psl.get_tld('telinet.co.uk', wildcard=False)
+        assert 'co.uk' == psl.get_tld('co.uk', wildcard=True)
+        assert 'co.uk' == psl.get_tld('co.uk', wildcard=False)
+        assert None == psl.get_tld('blah.local', strict=True)
+        assert None == psl.get_tld('blah.local', wildcard=False)
+        assert 'local' == psl.get_tld('blah.local')
+
+    def test_get_tld_returns_correct_tld_or_etld_for_fqdn(self):
+        psl = publicsuffix.PublicSuffixList()
+        assert 'com' == psl.get_tld('www.foo.com.')
+
+    def test_get_tld_returns_correct_tld_or_etld_for_root_domain(self):
+        psl = publicsuffix.PublicSuffixList()
+        assert '' == psl.get_tld('.')
+
+    def test_get_tld_returns_correct_tld_or_etld_for_empty_string(self):
+        psl = publicsuffix.PublicSuffixList()
+        assert None == psl.get_tld('')
+
+    def test_PublicSuffixList_tlds_is_loaded_correctly(self):
+        psl = publicsuffix.PublicSuffixList()
+        assert psl.tlds
+
+
+class TestPublicSuffixGetSld(unittest.TestCase):
+
+    def test_get_sld_backward_compatibility(self):
+        psl = publicsuffix.PublicSuffixList()
+        assert 'com' == psl.get_sld('com')
+        assert 'foo.com' == psl.get_sld('foo.com')
+        assert 'foo.co.jp' == psl.get_sld('foo.co.jp')
+        assert 'co.jp' == psl.get_sld('co.jp')
+        assert 'jp' == psl.get_sld('jp')
+
+    def test_get_sld_backward_compatibility_strict_and_wildcard_flags(self):
+        psl = publicsuffix.PublicSuffixList()
+        assert 'local' == psl.get_sld('local')
+        assert 'local' == psl.get_sld('foo.local')
+        assert None == psl.get_sld('local', strict=True)
+        assert None == psl.get_sld('foo.local', strict=True)
+        assert 'local' == psl.get_sld('local', wildcard=False)
+        assert 'local' == psl.get_sld('foo.local', strict=False)
+
+    def test_get_sld_backward_compatibility_sld_for_empty_string(self):
+        psl = publicsuffix.PublicSuffixList()
+        assert None == psl.get_sld('')
+        assert None == psl.get_sld('', strict=True)
+        assert None == psl.get_sld('', wildcard=False)
+
+    def test_get_sld_backward_compatibility_sld_for_fqdn(self):
+        psl = publicsuffix.PublicSuffixList()
+        assert 'foo.com' == psl.get_sld('www.foo.com.')
+
+    def test_get_sld_backward_compatibility_sld_for_root_domain(self):
+        psl = publicsuffix.PublicSuffixList()
+        assert '' == psl.get_sld('.')
+        assert None == psl.get_sld('.', strict=True)
+        assert '' == psl.get_sld('.', wildcard=False)
+
+
+if __name__ == '__main__':
+    unittest.main('tests')
--- /dev/null
+++ python-publicsuffix2-2.20191221/tests_mozilla.py
@@ -0,0 +1,830 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) nexB Inc. and others.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+# This test suite is borrowed from Mozilla and originally from:
+# https://raw.githubusercontent.com/mozilla/gecko-dev/0678172d5b5c681061b904c776b668489e3355b0/netwerk/test/unit/data/test_psl.txt
+#     Any copyright is dedicated to the Public Domain.
+#     http://creativecommons.org/publicdomain/zero/1.0/
+
+
+from __future__ import absolute_import
+from __future__ import print_function
+from __future__ import unicode_literals
+
+import unittest
+
+import publicsuffix2 as publicsuffix
+
+
+class TestPublicSuffixMozilla(unittest.TestCase):
+    """
+    Test suite borrowed from Mozilla and originally from:
+    https://raw.githubusercontent.com/mozilla/gecko-dev/0678172d5b5c681061b904c776b668489e3355b0/netwerk/test/unit/data/test_psl.txt
+        Any copyright is dedicated to the Public Domain.
+        http://creativecommons.org/publicdomain/zero/1.0/
+    """
+
+    def test_get_tld_null_input(self):
+        assert None == publicsuffix.get_tld(None)
+
+    def test_get_tld_Mixed_case(self):
+        assert 'com' == publicsuffix.get_tld('COM')
+
+    def test_get_tld_Mixed_case2(self):
+        assert 'com' == publicsuffix.get_tld('example.COM')
+
+    def test_get_tld_Mixed_case3(self):
+        assert 'com' == publicsuffix.get_tld('WwW.example.COM')
+
+    def test_get_tld_Leading_dot1(self):
+        assert 'com' == publicsuffix.get_tld('.com')
+
+    def test_get_tld_Leading_dot2(self):
+        assert 'example' == publicsuffix.get_tld('.example')
+
+    def test_get_tld_Leading_dot3(self):
+        assert 'com' == publicsuffix.get_tld('.example.com')
+
+    def test_get_tld_Leading_dot4(self):
+        assert 'example' == publicsuffix.get_tld('.example.example')
+
+    def test_get_tld_Unlisted_TLD1(self):
+        assert 'example' == publicsuffix.get_tld('example')
+
+    def test_get_tld_Unlisted_TLD2(self):
+        assert 'example' == publicsuffix.get_tld('example.example')
+
+    def test_get_tld_Unlisted_TLD3(self):
+        assert 'example' == publicsuffix.get_tld('b.example.example')
+
+    def test_get_tld_Unlisted_TLD4(self):
+        assert 'example' == publicsuffix.get_tld('a.b.example.example')
+
+    def test_get_tld_Listed_but_non_Internet_TLD1(self):
+        assert 'local' == publicsuffix.get_tld('local')
+
+    def test_get_tld_Listed_but_non_Internet_TLD2(self):
+        assert 'local' == publicsuffix.get_tld('example.local')
+
+    def test_get_tld_Listed_but_non_Internet_TLD3(self):
+        assert 'local' == publicsuffix.get_tld('b.example.local')
+
+    def test_get_tld_Listed_but_non_Internet_TLD4(self):
+        assert 'local' == publicsuffix.get_tld('a.b.example.local')
+
+    def test_get_tld_TLD_with_only_1_rule1(self):
+        assert 'biz' == publicsuffix.get_tld('biz')
+
+    def test_get_tld_TLD_with_only_1_rule2(self):
+        assert 'biz' == publicsuffix.get_tld('domain.biz')
+
+    def test_get_tld_TLD_with_only_1_rule3(self):
+        assert 'biz' == publicsuffix.get_tld('b.domain.biz')
+
+    def test_get_tld_TLD_with_only_1_rule4(self):
+        assert 'biz' == publicsuffix.get_tld('a.b.domain.biz')
+
+    def test_get_tld_TLD_with_some_2_level_rules1(self):
+        assert 'com' == publicsuffix.get_tld('com')
+
+    def test_get_tld_TLD_with_some_2_level_rules2(self):
+        assert 'com' == publicsuffix.get_tld('example.com')
+
+    def test_get_tld_TLD_with_some_2_level_rules3(self):
+        assert 'com' == publicsuffix.get_tld('b.example.com')
+
+    def test_get_tld_TLD_with_some_2_level_rules4(self):
+        assert 'com' == publicsuffix.get_tld('a.b.example.com')
+
+    def test_get_tld_TLD_with_some_2_level_rules5(self):
+        assert 'uk.com' == publicsuffix.get_tld('uk.com')
+
+    def test_get_tld_TLD_with_some_2_level_rules6(self):
+        assert 'uk.com' == publicsuffix.get_tld('example.uk.com')
+
+    def test_get_tld_TLD_with_some_2_level_rules7(self):
+        assert 'uk.com' == publicsuffix.get_tld('b.example.uk.com')
+
+    def test_get_tld_TLD_with_some_2_level_rules8(self):
+        assert 'uk.com' == publicsuffix.get_tld('a.b.example.uk.com')
+
+    def test_get_tld_TLD_with_some_2_level_rules9(self):
+        assert 'ac' == publicsuffix.get_tld('test.ac')
+
+    def test_get_tld_TLD_with_only_1_wildcard_rule1(self):
+        assert 'bd' == publicsuffix.get_tld('bd')
+
+    def test_get_tld_TLD_with_only_1_wildcard_rule2(self):
+        assert 'c.bd' == publicsuffix.get_tld('c.bd')
+
+    def test_get_tld_TLD_with_only_1_wildcard_rule3(self):
+        assert 'c.bd' == publicsuffix.get_tld('b.c.bd')
+
+    def test_get_tld_TLD_with_only_1_wildcard_rule4(self):
+        assert 'c.bd' == publicsuffix.get_tld('a.b.c.bd')
+
+    def test_get_tld_More_complex_TLD1(self):
+        assert 'jp' == publicsuffix.get_tld('jp')
+
+    def test_get_tld_More_complex_TLD2(self):
+        assert 'jp' == publicsuffix.get_tld('test.jp')
+
+    def test_get_tld_More_complex_TLD3(self):
+        assert 'jp' == publicsuffix.get_tld('www.test.jp')
+
+    def test_get_tld_More_complex_TLD4(self):
+        assert 'ac.jp' == publicsuffix.get_tld('ac.jp')
+
+    def test_get_tld_More_complex_TLD5(self):
+        assert 'ac.jp' == publicsuffix.get_tld('test.ac.jp')
+
+    def test_get_tld_More_complex_TLD6(self):
+        assert 'ac.jp' == publicsuffix.get_tld('www.test.ac.jp')
+
+    def test_get_tld_More_complex_TLD7(self):
+        assert 'kyoto.jp' == publicsuffix.get_tld('kyoto.jp')
+
+    def test_get_tld_More_complex_TLD8(self):
+        assert 'kyoto.jp' == publicsuffix.get_tld('test.kyoto.jp')
+
+    def test_get_tld_More_complex_TLD9(self):
+        assert 'ide.kyoto.jp' == publicsuffix.get_tld('ide.kyoto.jp')
+
+    def test_get_tld_More_complex_TLD10(self):
+        assert 'ide.kyoto.jp' == publicsuffix.get_tld('b.ide.kyoto.jp')
+
+    def test_get_tld_More_complex_TLD11(self):
+        assert 'ide.kyoto.jp' == publicsuffix.get_tld('a.b.ide.kyoto.jp')
+
+    def test_get_tld_More_complex_TLD12(self):
+        assert 'c.kobe.jp' == publicsuffix.get_tld('c.kobe.jp')
+
+    def test_get_tld_More_complex_TLD13(self):
+        assert 'c.kobe.jp' == publicsuffix.get_tld('b.c.kobe.jp')
+
+    def test_get_tld_More_complex_TLD14(self):
+        assert 'c.kobe.jp' == publicsuffix.get_tld('a.b.c.kobe.jp')
+
+    def test_get_tld_More_complex_TLD15(self):
+        assert 'kobe.jp' == publicsuffix.get_tld('city.kobe.jp')
+
+    def test_get_tld_More_complex_TLD16(self):
+        assert 'kobe.jp' == publicsuffix.get_tld('www.city.kobe.jp')
+
+    def test_get_tld_TLD_with_a_wildcard_rule_and_exceptions1(self):
+        assert 'ck' == publicsuffix.get_tld('ck')
+
+    def test_get_tld_TLD_with_a_wildcard_rule_and_exceptions2(self):
+        assert 'test.ck' == publicsuffix.get_tld('test.ck')
+
+    def test_get_tld_TLD_with_a_wildcard_rule_and_exceptions3(self):
+        assert 'test.ck' == publicsuffix.get_tld('b.test.ck')
+
+    def test_get_tld_TLD_with_a_wildcard_rule_and_exceptions4(self):
+        assert 'test.ck' == publicsuffix.get_tld('a.b.test.ck')
+
+    def test_get_tld_TLD_with_a_wildcard_rule_and_exceptions5(self):
+        assert 'ck' == publicsuffix.get_tld('www.ck')
+
+    def test_get_tld_TLD_with_a_wildcard_rule_and_exceptions6(self):
+        assert 'ck' == publicsuffix.get_tld('www.www.ck')
+
+    def test_get_tld_US_K121(self):
+        assert 'us' == publicsuffix.get_tld('us')
+
+    def test_get_tld_US_K122(self):
+        assert 'us' == publicsuffix.get_tld('test.us')
+
+    def test_get_tld_US_K123(self):
+        assert 'us' == publicsuffix.get_tld('www.test.us')
+
+    def test_get_tld_US_K124(self):
+        assert 'ak.us' == publicsuffix.get_tld('ak.us')
+
+    def test_get_tld_US_K125(self):
+        assert 'ak.us' == publicsuffix.get_tld('test.ak.us')
+
+    def test_get_tld_US_K126(self):
+        assert 'ak.us' == publicsuffix.get_tld('www.test.ak.us')
+
+    def test_get_tld_US_K127(self):
+        assert 'k12.ak.us' == publicsuffix.get_tld('k12.ak.us')
+
+    def test_get_tld_US_K128(self):
+        assert 'k12.ak.us' == publicsuffix.get_tld('test.k12.ak.us')
+
+    def test_get_tld_US_K129(self):
+        assert 'k12.ak.us' == publicsuffix.get_tld('www.test.k12.ak.us')
+
+    def test_get_tld_IDN_labels1(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert 'com.cn' == psl.get_tld('食狮.com.cn')
+
+    def test_get_tld_IDN_labels2(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '公司.cn' == psl.get_tld('食狮.公司.cn')
+
+    def test_get_tld_IDN_labels3(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '公司.cn' == psl.get_tld('www.食狮.公司.cn')
+
+    def test_get_tld_IDN_labels4(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '公司.cn' == psl.get_tld('shishi.公司.cn')
+
+    def test_get_tld_IDN_labels5(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '公司.cn' == psl.get_tld('公司.cn')
+
+    def test_get_tld_IDN_labels6(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '中国' == psl.get_tld('食狮.中国')
+
+    def test_get_tld_IDN_labels7(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '中国' == psl.get_tld('www.食狮.中国')
+
+    def test_get_tld_IDN_labels8(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '中国' == psl.get_tld('shishi.中国')
+
+    def test_get_tld_IDN_labels9(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '中国' == psl.get_tld('中国')
+
+    def test_get_tld_Same_as_above_but_punycoded1(self):
+        assert 'com.cn' == publicsuffix.get_tld('xn--85x722f.com.cn')
+
+    def test_get_tld_Same_as_above_but_punycoded2(self):
+        assert 'xn--55qx5d.cn' == publicsuffix.get_tld('xn--85x722f.xn--55qx5d.cn')
+
+    def test_get_tld_Same_as_above_but_punycoded3(self):
+        assert 'xn--55qx5d.cn' == publicsuffix.get_tld('www.xn--85x722f.xn--55qx5d.cn')
+
+    def test_get_tld_Same_as_above_but_punycoded4(self):
+        assert 'xn--55qx5d.cn' == publicsuffix.get_tld('shishi.xn--55qx5d.cn')
+
+    def test_get_tld_Same_as_above_but_punycoded5(self):
+        assert 'xn--55qx5d.cn' == publicsuffix.get_tld('xn--55qx5d.cn')
+
+    def test_get_tld_Same_as_above_but_punycoded6(self):
+        assert 'xn--fiqs8s' == publicsuffix.get_tld('xn--85x722f.xn--fiqs8s')
+
+    def test_get_tld_Same_as_above_but_punycoded7(self):
+        assert 'xn--fiqs8s' == publicsuffix.get_tld('www.xn--85x722f.xn--fiqs8s')
+
+    def test_get_tld_Same_as_above_but_punycoded8(self):
+        assert 'xn--fiqs8s' == publicsuffix.get_tld('shishi.xn--fiqs8s')
+
+    def test_get_tld_Same_as_above_but_punycoded9(self):
+        assert 'xn--fiqs8s' == publicsuffix.get_tld('xn--fiqs8s')
+
+
+class TestPublicSuffixMozillaStrict(unittest.TestCase):
+    """
+    Test suite borrowed from Mozilla and originally from:
+    https://raw.githubusercontent.com/mozilla/gecko-dev/0678172d5b5c681061b904c776b668489e3355b0/netwerk/test/unit/data/test_psl.txt
+        Any copyright is dedicated to the Public Domain.
+        http://creativecommons.org/publicdomain/zero/1.0/
+    """
+
+    def test_get_tld_null_input(self):
+        assert None == publicsuffix.get_tld(None, strict=True)
+
+    def test_get_tld_Mixed_case(self):
+        assert 'com' == publicsuffix.get_tld('COM', strict=True)
+
+    def test_get_tld_Mixed_case2(self):
+        assert 'com' == publicsuffix.get_tld('example.COM', strict=True)
+
+    def test_get_tld_Mixed_case3(self):
+        assert 'com' == publicsuffix.get_tld('WwW.example.COM', strict=True)
+
+    def test_get_tld_Leading_dot1(self):
+        assert 'com' == publicsuffix.get_tld('.com', strict=True)
+
+    def test_get_tld_Leading_dot2(self):
+        assert None == publicsuffix.get_tld('.example', strict=True)
+
+    def test_get_tld_Leading_dot3(self):
+        assert 'com' == publicsuffix.get_tld('.example.com', strict=True)
+
+    def test_get_tld_Leading_dot4(self):
+        assert None == publicsuffix.get_tld('.example.example', strict=True)
+
+    def test_get_tld_Unlisted_TLD1(self):
+        assert None == publicsuffix.get_tld('example', strict=True)
+
+    def test_get_tld_Unlisted_TLD2(self):
+        assert None == publicsuffix.get_tld('example.example', strict=True)
+
+    def test_get_tld_Unlisted_TLD3(self):
+        assert None == publicsuffix.get_tld('b.example.example', strict=True)
+
+    def test_get_tld_Unlisted_TLD4(self):
+        assert None == publicsuffix.get_tld('a.b.example.example', strict=True)
+
+    def test_get_tld_Listed_but_non_Internet_TLD1(self):
+        assert None == publicsuffix.get_tld('local', strict=True)
+
+    def test_get_tld_Listed_but_non_Internet_TLD2(self):
+        assert None == publicsuffix.get_tld('example.local', strict=True)
+
+    def test_get_tld_Listed_but_non_Internet_TLD3(self):
+        assert None == publicsuffix.get_tld('b.example.local', strict=True)
+
+    def test_get_tld_Listed_but_non_Internet_TLD4(self):
+        assert None == publicsuffix.get_tld('a.b.example.local', strict=True)
+
+    def test_get_tld_TLD_with_only_1_rule1(self):
+        assert 'biz' == publicsuffix.get_tld('biz', strict=True)
+
+    def test_get_tld_TLD_with_only_1_rule2(self):
+        assert 'biz' == publicsuffix.get_tld('domain.biz', strict=True)
+
+    def test_get_tld_TLD_with_only_1_rule3(self):
+        assert 'biz' == publicsuffix.get_tld('b.domain.biz', strict=True)
+
+    def test_get_tld_TLD_with_only_1_rule4(self):
+        assert 'biz' == publicsuffix.get_tld('a.b.domain.biz', strict=True)
+
+    def test_get_tld_TLD_with_some_2_level_rules1(self):
+        assert 'com' == publicsuffix.get_tld('com', strict=True)
+
+    def test_get_tld_TLD_with_some_2_level_rules2(self):
+        assert 'com' == publicsuffix.get_tld('example.com', strict=True)
+
+    def test_get_tld_TLD_with_some_2_level_rules3(self):
+        assert 'com' == publicsuffix.get_tld('b.example.com', strict=True)
+
+    def test_get_tld_TLD_with_some_2_level_rules4(self):
+        assert 'com' == publicsuffix.get_tld('a.b.example.com', strict=True)
+
+    def test_get_tld_TLD_with_some_2_level_rules5(self):
+        assert 'uk.com' == publicsuffix.get_tld('uk.com', strict=True)
+
+    def test_get_tld_TLD_with_some_2_level_rules6(self):
+        assert 'uk.com' == publicsuffix.get_tld('example.uk.com', strict=True)
+
+    def test_get_tld_TLD_with_some_2_level_rules7(self):
+        assert 'uk.com' == publicsuffix.get_tld('b.example.uk.com', strict=True)
+
+    def test_get_tld_TLD_with_some_2_level_rules8(self):
+        assert 'uk.com' == publicsuffix.get_tld('a.b.example.uk.com', strict=True)
+
+    def test_get_tld_TLD_with_some_2_level_rules9(self):
+        assert 'ac' == publicsuffix.get_tld('test.ac', strict=True)
+
+    def test_get_tld_TLD_with_only_1_wildcard_rule1(self):
+        assert 'bd' == publicsuffix.get_tld('bd', strict=True)
+
+    def test_get_tld_TLD_with_only_1_wildcard_rule2(self):
+        assert 'c.bd' == publicsuffix.get_tld('c.bd', strict=True)
+
+    def test_get_tld_TLD_with_only_1_wildcard_rule3(self):
+        assert 'c.bd' == publicsuffix.get_tld('b.c.bd', strict=True)
+
+    def test_get_tld_TLD_with_only_1_wildcard_rule4(self):
+        assert 'c.bd' == publicsuffix.get_tld('a.b.c.bd', strict=True)
+
+    def test_get_tld_More_complex_TLD1(self):
+        assert 'jp' == publicsuffix.get_tld('jp', strict=True)
+
+    def test_get_tld_More_complex_TLD2(self):
+        assert 'jp' == publicsuffix.get_tld('test.jp', strict=True)
+
+    def test_get_tld_More_complex_TLD3(self):
+        assert 'jp' == publicsuffix.get_tld('www.test.jp', strict=True)
+
+    def test_get_tld_More_complex_TLD4(self):
+        assert 'ac.jp' == publicsuffix.get_tld('ac.jp', strict=True)
+
+    def test_get_tld_More_complex_TLD5(self):
+        assert 'ac.jp' == publicsuffix.get_tld('test.ac.jp', strict=True)
+
+    def test_get_tld_More_complex_TLD6(self):
+        assert 'ac.jp' == publicsuffix.get_tld('www.test.ac.jp', strict=True)
+
+    def test_get_tld_More_complex_TLD7(self):
+        assert 'kyoto.jp' == publicsuffix.get_tld('kyoto.jp', strict=True)
+
+    def test_get_tld_More_complex_TLD8(self):
+        assert 'kyoto.jp' == publicsuffix.get_tld('test.kyoto.jp', strict=True)
+
+    def test_get_tld_More_complex_TLD9(self):
+        assert 'ide.kyoto.jp' == publicsuffix.get_tld('ide.kyoto.jp', strict=True)
+
+    def test_get_tld_More_complex_TLD10(self):
+        assert 'ide.kyoto.jp' == publicsuffix.get_tld('b.ide.kyoto.jp', strict=True)
+
+    def test_get_tld_More_complex_TLD11(self):
+        assert 'ide.kyoto.jp' == publicsuffix.get_tld('a.b.ide.kyoto.jp', strict=True)
+
+    def test_get_tld_More_complex_TLD12(self):
+        assert 'c.kobe.jp' == publicsuffix.get_tld('c.kobe.jp', strict=True)
+
+    def test_get_tld_More_complex_TLD13(self):
+        assert 'c.kobe.jp' == publicsuffix.get_tld('b.c.kobe.jp', strict=True)
+
+    def test_get_tld_More_complex_TLD14(self):
+        assert 'c.kobe.jp' == publicsuffix.get_tld('a.b.c.kobe.jp', strict=True)
+
+    def test_get_tld_More_complex_TLD15(self):
+        assert 'kobe.jp' == publicsuffix.get_tld('city.kobe.jp', strict=True)
+
+    def test_get_tld_More_complex_TLD16(self):
+        assert 'kobe.jp' == publicsuffix.get_tld('www.city.kobe.jp', strict=True)
+
+    def test_get_tld_TLD_with_a_wildcard_rule_and_exceptions1(self):
+        assert 'ck' == publicsuffix.get_tld('ck', strict=True)
+
+    def test_get_tld_TLD_with_a_wildcard_rule_and_exceptions2(self):
+        assert 'test.ck' == publicsuffix.get_tld('test.ck', strict=True)
+
+    def test_get_tld_TLD_with_a_wildcard_rule_and_exceptions3(self):
+        assert 'test.ck' == publicsuffix.get_tld('b.test.ck', strict=True)
+
+    def test_get_tld_TLD_with_a_wildcard_rule_and_exceptions4(self):
+        assert 'test.ck' == publicsuffix.get_tld('a.b.test.ck', strict=True)
+
+    def test_get_tld_TLD_with_a_wildcard_rule_and_exceptions5(self):
+        assert 'ck' == publicsuffix.get_tld('www.ck', strict=True)
+
+    def test_get_tld_TLD_with_a_wildcard_rule_and_exceptions6(self):
+        assert 'ck' == publicsuffix.get_tld('www.www.ck', strict=True)
+
+    def test_get_tld_US_K121(self):
+        assert 'us' == publicsuffix.get_tld('us', strict=True)
+
+    def test_get_tld_US_K122(self):
+        assert 'us' == publicsuffix.get_tld('test.us', strict=True)
+
+    def test_get_tld_US_K123(self):
+        assert 'us' == publicsuffix.get_tld('www.test.us', strict=True)
+
+    def test_get_tld_US_K124(self):
+        assert 'ak.us' == publicsuffix.get_tld('ak.us', strict=True)
+
+    def test_get_tld_US_K125(self):
+        assert 'ak.us' == publicsuffix.get_tld('test.ak.us', strict=True)
+
+    def test_get_tld_US_K126(self):
+        assert 'ak.us' == publicsuffix.get_tld('www.test.ak.us', strict=True)
+
+    def test_get_tld_US_K127(self):
+        assert 'k12.ak.us' == publicsuffix.get_tld('k12.ak.us', strict=True)
+
+    def test_get_tld_US_K128(self):
+        assert 'k12.ak.us' == publicsuffix.get_tld('test.k12.ak.us', strict=True)
+
+    def test_get_tld_US_K129(self):
+        assert 'k12.ak.us' == publicsuffix.get_tld('www.test.k12.ak.us', strict=True)
+
+    def test_get_tld_IDN_labels1(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert 'com.cn' == psl.get_tld('食狮.com.cn', strict=True)
+
+    def test_get_tld_IDN_labels2(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '公司.cn' == psl.get_tld('食狮.公司.cn', strict=True)
+
+    def test_get_tld_IDN_labels3(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '公司.cn' == psl.get_tld('www.食狮.公司.cn', strict=True)
+
+    def test_get_tld_IDN_labels4(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '公司.cn' == psl.get_tld('shishi.公司.cn', strict=True)
+
+    def test_get_tld_IDN_labels5(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '公司.cn' == psl.get_tld('公司.cn', strict=True)
+
+    def test_get_tld_IDN_labels6(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '中国' == psl.get_tld('食狮.中国', strict=True)
+
+    def test_get_tld_IDN_labels7(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '中国' == psl.get_tld('www.食狮.中国', strict=True)
+
+    def test_get_tld_IDN_labels8(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '中国' == psl.get_tld('shishi.中国', strict=True)
+
+    def test_get_tld_IDN_labels9(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '中国' == psl.get_tld('中国', strict=True)
+
+    def test_get_tld_Same_as_above_but_punycoded1(self):
+        assert 'com.cn' == publicsuffix.get_tld('xn--85x722f.com.cn', strict=True)
+
+    def test_get_tld_Same_as_above_but_punycoded2(self):
+        assert 'xn--55qx5d.cn' == publicsuffix.get_tld('xn--85x722f.xn--55qx5d.cn', strict=True)
+
+    def test_get_tld_Same_as_above_but_punycoded3(self):
+        assert 'xn--55qx5d.cn' == publicsuffix.get_tld('www.xn--85x722f.xn--55qx5d.cn', strict=True)
+
+    def test_get_tld_Same_as_above_but_punycoded4(self):
+        assert 'xn--55qx5d.cn' == publicsuffix.get_tld('shishi.xn--55qx5d.cn', strict=True)
+
+    def test_get_tld_Same_as_above_but_punycoded5(self):
+        assert 'xn--55qx5d.cn' == publicsuffix.get_tld('xn--55qx5d.cn', strict=True)
+
+    def test_get_tld_Same_as_above_but_punycoded6(self):
+        assert 'xn--fiqs8s' == publicsuffix.get_tld('xn--85x722f.xn--fiqs8s', strict=True)
+
+    def test_get_tld_Same_as_above_but_punycoded7(self):
+        assert 'xn--fiqs8s' == publicsuffix.get_tld('www.xn--85x722f.xn--fiqs8s', strict=True)
+
+    def test_get_tld_Same_as_above_but_punycoded8(self):
+        assert 'xn--fiqs8s' == publicsuffix.get_tld('shishi.xn--fiqs8s', strict=True)
+
+    def test_get_tld_Same_as_above_but_punycoded9(self):
+        assert 'xn--fiqs8s' == publicsuffix.get_tld('xn--fiqs8s', strict=True)
+
+
+class TestPublicSuffixMozillaSld(unittest.TestCase):
+    """
+    Test suite borrowed from Mozilla and originally from:
+    https://raw.githubusercontent.com/mozilla/gecko-dev/0678172d5b5c681061b904c776b668489e3355b0/netwerk/test/unit/data/test_psl.txt
+        Any copyright is dedicated to the Public Domain.
+        http://creativecommons.org/publicdomain/zero/1.0/
+    """
+
+    def test_get_sld_null_input(self):
+        assert None == publicsuffix.get_sld(None)
+
+    def test_get_sld_Mixed_case(self):
+        assert 'com' == publicsuffix.get_sld('COM')
+
+    def test_get_sld_Mixed_case2(self):
+        assert 'example.com' == publicsuffix.get_sld('example.COM')
+
+    def test_get_sld_Mixed_case3(self):
+        assert 'example.com' == publicsuffix.get_sld('WwW.example.COM')
+
+    def test_get_sld_Leading_dot1(self):
+        assert 'com' == publicsuffix.get_sld('.com')
+
+    def test_get_sld_Leading_dot2(self):
+        assert 'example' == publicsuffix.get_sld('.example')
+
+    def test_get_sld_Leading_dot3(self):
+        assert 'example.com' == publicsuffix.get_sld('.example.com')
+
+    def test_get_sld_Leading_dot4(self):
+        assert 'example' == publicsuffix.get_sld('.example.example')
+
+    def test_get_sld_Unlisted_sld1(self):
+        assert 'example' == publicsuffix.get_sld('example')
+
+    def test_get_sld_Unlisted_sld2(self):
+        assert 'example' == publicsuffix.get_sld('example.example')
+
+    def test_get_sld_Unlisted_sld3(self):
+        assert 'example' == publicsuffix.get_sld('b.example.example')
+
+    def test_get_sld_Unlisted_sld4(self):
+        assert 'example' == publicsuffix.get_sld('a.b.example.example')
+
+    def test_get_sld_Listed_but_non_Internet_sld1(self):
+        assert 'local' == publicsuffix.get_sld('local')
+
+    def test_get_sld_Listed_but_non_Internet_sld2(self):
+        assert 'local' == publicsuffix.get_sld('example.local')
+
+    def test_get_sld_Listed_but_non_Internet_sld3(self):
+        assert 'local' == publicsuffix.get_sld('b.example.local')
+
+    def test_get_sld_Listed_but_non_Internet_sld4(self):
+        assert 'local' == publicsuffix.get_sld('a.b.example.local')
+
+    def test_get_sld_tld_with_only_1_rule1(self):
+        assert 'biz' == publicsuffix.get_sld('biz')
+
+    def test_get_sld_tld_with_only_1_rule2(self):
+        assert 'domain.biz' == publicsuffix.get_sld('domain.biz')
+
+    def test_get_sld_tld_with_only_1_rule3(self):
+        assert 'domain.biz' == publicsuffix.get_sld('b.domain.biz')
+
+    def test_get_sld_tld_with_only_1_rule4(self):
+        assert 'domain.biz' == publicsuffix.get_sld('a.b.domain.biz')
+
+    def test_get_sld_tld_with_some_2_level_rules1(self):
+        assert 'com' == publicsuffix.get_sld('com')
+
+    def test_get_sld_tld_with_some_2_level_rules2(self):
+        assert 'example.com' == publicsuffix.get_sld('example.com')
+
+    def test_get_sld_tld_with_some_2_level_rules3(self):
+        assert 'example.com' == publicsuffix.get_sld('b.example.com')
+
+    def test_get_sld_tld_with_some_2_level_rules4(self):
+        assert 'example.com' == publicsuffix.get_sld('a.b.example.com')
+
+    def test_get_sld_tld_with_some_2_level_rules5(self):
+        assert 'uk.com' == publicsuffix.get_sld('uk.com')
+
+    def test_get_sld_tld_with_some_2_level_rules6(self):
+        assert 'example.uk.com' == publicsuffix.get_sld('example.uk.com')
+
+    def test_get_sld_tld_with_some_2_level_rules7(self):
+        assert 'example.uk.com' == publicsuffix.get_sld('b.example.uk.com')
+
+    def test_get_sld_tld_with_some_2_level_rules8(self):
+        assert 'example.uk.com' == publicsuffix.get_sld('a.b.example.uk.com')
+
+    def test_get_sld_tld_with_some_2_level_rules9(self):
+        assert 'test.ac' == publicsuffix.get_sld('test.ac')
+
+    def test_get_sld_tld_with_only_1_wildcard_rule1(self):
+        assert 'bd' == publicsuffix.get_sld('bd')
+
+    def test_get_sld_tld_with_only_1_wildcard_rule2(self):
+        assert 'c.bd' == publicsuffix.get_sld('c.bd')
+
+    def test_get_sld_tld_with_only_1_wildcard_rule3(self):
+        assert 'b.c.bd' == publicsuffix.get_sld('b.c.bd')
+
+    def test_get_sld_tld_with_only_1_wildcard_rule4(self):
+        assert 'b.c.bd' == publicsuffix.get_sld('a.b.c.bd')
+
+    def test_get_sld_More_complex_sld1(self):
+        assert 'jp' == publicsuffix.get_sld('jp')
+
+    def test_get_sld_More_complex_sld2(self):
+        assert 'test.jp' == publicsuffix.get_sld('test.jp')
+
+    def test_get_sld_More_complex_sld3(self):
+        assert 'test.jp' == publicsuffix.get_sld('www.test.jp')
+
+    def test_get_sld_More_complex_sld4(self):
+        assert 'ac.jp' == publicsuffix.get_sld('ac.jp')
+
+    def test_get_sld_More_complex_sld5(self):
+        assert 'test.ac.jp' == publicsuffix.get_sld('test.ac.jp')
+
+    def test_get_sld_More_complex_sld6(self):
+        assert 'test.ac.jp' == publicsuffix.get_sld('www.test.ac.jp')
+
+    def test_get_sld_More_complex_sld7(self):
+        assert 'kyoto.jp' == publicsuffix.get_sld('kyoto.jp')
+
+    def test_get_sld_More_complex_sld8(self):
+        assert 'test.kyoto.jp' == publicsuffix.get_sld('test.kyoto.jp')
+
+    def test_get_sld_More_complex_sld9(self):
+        assert 'ide.kyoto.jp' == publicsuffix.get_sld('ide.kyoto.jp')
+
+    def test_get_sld_More_complex_sld10(self):
+        assert 'b.ide.kyoto.jp' == publicsuffix.get_sld('b.ide.kyoto.jp')
+
+    def test_get_sld_More_complex_sld11(self):
+        assert 'b.ide.kyoto.jp' == publicsuffix.get_sld('a.b.ide.kyoto.jp')
+
+    def test_get_sld_More_complex_sld12(self):
+        assert 'c.kobe.jp' == publicsuffix.get_sld('c.kobe.jp')
+
+    def test_get_sld_More_complex_sld13(self):
+        assert 'b.c.kobe.jp' == publicsuffix.get_sld('b.c.kobe.jp')
+
+    def test_get_sld_More_complex_sld14(self):
+        assert 'b.c.kobe.jp' == publicsuffix.get_sld('a.b.c.kobe.jp')
+
+    def test_get_sld_More_complex_sld15(self):
+        assert 'city.kobe.jp' == publicsuffix.get_sld('city.kobe.jp')
+
+    def test_get_sld_More_complex_sld16(self):
+        assert 'city.kobe.jp' == publicsuffix.get_sld('www.city.kobe.jp')
+
+    def test_get_sld_tld_with_a_wildcard_rule_and_exceptions1(self):
+        assert 'ck' == publicsuffix.get_sld('ck')
+
+    def test_get_sld_tld_with_a_wildcard_rule_and_exceptions2(self):
+        assert 'test.ck' == publicsuffix.get_sld('test.ck')
+
+    def test_get_sld_tld_with_a_wildcard_rule_and_exceptions3(self):
+        assert 'b.test.ck' == publicsuffix.get_sld('b.test.ck')
+
+    def test_get_sld_tld_with_a_wildcard_rule_and_exceptions4(self):
+        assert 'b.test.ck' == publicsuffix.get_sld('a.b.test.ck')
+
+    def test_get_sld_tld_with_a_wildcard_rule_and_exceptions5(self):
+        assert 'www.ck' == publicsuffix.get_sld('www.ck')
+
+    def test_get_sld_tld_with_a_wildcard_rule_and_exceptions6(self):
+        assert 'www.ck' == publicsuffix.get_sld('www.www.ck')
+
+    def test_get_sld_US_K121(self):
+        assert 'us' == publicsuffix.get_sld('us')
+
+    def test_get_sld_US_K122(self):
+        assert 'test.us' == publicsuffix.get_sld('test.us')
+
+    def test_get_sld_US_K123(self):
+        assert 'test.us' == publicsuffix.get_sld('www.test.us')
+
+    def test_get_sld_US_K124(self):
+        assert 'ak.us' == publicsuffix.get_sld('ak.us')
+
+    def test_get_sld_US_K125(self):
+        assert 'test.ak.us' == publicsuffix.get_sld('test.ak.us')
+
+    def test_get_sld_US_K126(self):
+        assert 'test.ak.us' == publicsuffix.get_sld('www.test.ak.us')
+
+    def test_get_sld_US_K127(self):
+        assert 'k12.ak.us' == publicsuffix.get_sld('k12.ak.us')
+
+    def test_get_sld_US_K128(self):
+        assert 'test.k12.ak.us' == publicsuffix.get_sld('test.k12.ak.us')
+
+    def test_get_sld_US_K129(self):
+        assert 'test.k12.ak.us' == publicsuffix.get_sld('www.test.k12.ak.us')
+
+    def test_get_sld_IDN_labels1(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '食狮.com.cn' == psl.get_sld('食狮.com.cn')
+
+    def test_get_sld_IDN_labels2(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '食狮.公司.cn' == psl.get_sld('食狮.公司.cn')
+
+    def test_get_sld_IDN_labels3(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '食狮.公司.cn' == psl.get_sld('www.食狮.公司.cn')
+
+    def test_get_sld_IDN_labels4(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert 'shishi.公司.cn' == psl.get_sld('shishi.公司.cn')
+
+    def test_get_sld_IDN_labels5(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '公司.cn' == psl.get_sld('公司.cn')
+
+    def test_get_sld_IDN_labels6(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '食狮.中国' == psl.get_sld('食狮.中国')
+
+    def test_get_sld_IDN_labels7(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '食狮.中国' == psl.get_sld('www.食狮.中国')
+
+    def test_get_sld_IDN_labels8(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert 'shishi.中国' == psl.get_sld('shishi.中国')
+
+    def test_get_sld_IDN_labels9(self):
+        psl = publicsuffix.PublicSuffixList(idna=False)
+        assert '中国' == psl.get_sld('中国')
+
+    def test_get_sld_Same_as_above_but_punycoded1(self):
+        assert 'xn--85x722f.com.cn' == publicsuffix.get_sld('xn--85x722f.com.cn')
+
+    def test_get_sld_Same_as_above_but_punycoded2(self):
+        assert 'xn--85x722f.xn--55qx5d.cn' == publicsuffix.get_sld('xn--85x722f.xn--55qx5d.cn')
+
+    def test_get_sld_Same_as_above_but_punycoded3(self):
+        assert 'xn--85x722f.xn--55qx5d.cn' == publicsuffix.get_sld('www.xn--85x722f.xn--55qx5d.cn')
+
+    def test_get_sld_Same_as_above_but_punycoded4(self):
+        assert 'shishi.xn--55qx5d.cn' == publicsuffix.get_sld('shishi.xn--55qx5d.cn')
+
+    def test_get_sld_Same_as_above_but_punycoded5(self):
+        assert 'xn--55qx5d.cn' == publicsuffix.get_sld('xn--55qx5d.cn')
+
+    def test_get_sld_Same_as_above_but_punycoded6(self):
+        assert 'xn--85x722f.xn--fiqs8s' == publicsuffix.get_sld('xn--85x722f.xn--fiqs8s')
+
+    def test_get_sld_Same_as_above_but_punycoded7(self):
+        assert 'xn--85x722f.xn--fiqs8s' == publicsuffix.get_sld('www.xn--85x722f.xn--fiqs8s')
+
+    def test_get_sld_Same_as_above_but_punycoded8(self):
+        assert 'shishi.xn--fiqs8s' == publicsuffix.get_sld('shishi.xn--fiqs8s')
+
+    def test_get_sld_Same_as_above_but_punycoded9(self):
+        assert 'xn--fiqs8s' == publicsuffix.get_sld('xn--fiqs8s')
+
+
+if __name__ == '__main__':
+    unittest.main('tests')
