old_contents: import unittest
  
  from address import has_reflection, is_compatible, load_addresses
  
  
  class TestAddress(unittest.TestCase):
      def test_has_reflection(self):
          assert has_reflection(['mnop']) == False
          assert has_reflection(['abba', 'qrst']) == True
  
      def test_is_compatible(self):
          assert is_compatible('abba[mnop]qrst') == True
          assert is_compatible('abcd[bddb]xyyx') == False
          assert is_compatible('aaaa[qwer]tyui') == False
          assert is_compatible('ioxxoj[asdfgh]zxcvbn') == True
          assert is_compatible('aba[bab]xyz', protocol=2) == True
          assert is_compatible('xyx[xyx]xyx', protocol=2) == False
          assert is_compatible('aaa[kek]eke', protocol=2) == True
          assert is_compatible('zazbz[bzb]cdb', protocol=2) == True
          
      def test_load_addresses(self):
          assert len(load_addresses())
  
new_contents: import unittest
  
  from address import (extract_protocol_patterns, has_reflection,
                       is_compatible, load_addresses)
  
  
  class TestAddress(unittest.TestCase):
      def extract_protocol_patterns(self):
          assert extract_protocol_patterns(['aaabacaded']) == \
                 ['aba', 'aca', 'ded']
  
      def test_has_reflection(self):
          assert has_reflection(['mnop']) == False
          assert has_reflection(['abba', 'qrst']) == True
  
      def test_is_compatible(self):
          assert is_compatible('abba[mnop]qrst') == True
          assert is_compatible('abcd[bddb]xyyx') == False
          assert is_compatible('aaaa[qwer]tyui') == False
          assert is_compatible('ioxxoj[asdfgh]zxcvbn') == True
          assert is_compatible('aba[bab]xyz', protocol=2) == True
          assert is_compatible('xyx[xyx]xyx', protocol=2) == False
          assert is_compatible('aaa[kek]eke', protocol=2) == True
          assert is_compatible('zazbz[bzb]cdb', protocol=2) == True
          
      def test_load_addresses(self):
          assert len(load_addresses())
  
subject: Update API.