Package dkim :: Package tests :: Module test_dnsplug
[hide private]
[frames] | no frames]

Source Code for Module dkim.tests.test_dnsplug

 1  # This software is provided 'as-is', without any express or implied 
 2  # warranty.  In no event will the author be held liable for any damages 
 3  # arising from the use of this software. 
 4  # 
 5  # Permission is granted to anyone to use this software for any purpose, 
 6  # including commercial applications, and to alter it and redistribute it 
 7  # freely, subject to the following restrictions: 
 8  # 
 9  # 1. The origin of this software must not be misrepresented; you must not 
10  #    claim that you wrote the original software. If you use this software 
11  #    in a product, an acknowledgment in the product documentation would be 
12  #    appreciated but is not required. 
13  # 2. Altered source versions must be plainly marked as such, and must not be 
14  #    misrepresented as being the original software. 
15  # 3. This notice may not be removed or altered from any source distribution. 
16  # 
17  # Copyright (c) 2017 Valimail Inc 
18  # Contact: Gene Shuman <gene@valimail.com> 
19  # 
20   
21  import unittest 
22  import dkim.dnsplug 
23   
24 -class TestDNSPlug(unittest.TestCase):
25
26 - def test_get_txt(self):
27 dkim.dnsplug._get_txt = {"in": "out"}.get 28 res = dkim.dnsplug.get_txt(b"in") 29 30 self.assertEqual(res, b"out")
31
32 -def test_suite():
33 from unittest import TestLoader 34 return TestLoader().loadTestsFromName(__name__)
35