
import unittest


class DNSBLTest(unittest.TestCase):
    pass



if __name__ == "__main__":
    #import sys;sys.argv = ['', 'Test.testName']
    unittest.main()

import unittest
from spambl import DNSBL


class DNSBLTest(unittest.TestCase):
    
    @classmethod
    def setUpClass(cls):
        code_item_class = {1: 'Class #1', 2: 'Class #2'}
        query_suffix = 'query.suffix'
        
        cls.dnsbl = DNSBL('test.dnsbl', query_suffix, code_item_class, True, True)
        
if __name__ == "__main__":
    #import sys;sys.argv = ['', 'Test.testName']
    unittest.main()
Add setUpClass method to DNSBLTest
Add setUpClass method to DNSBLTest

This method is used to set up a common instance of DNSBL for testing

  
  import unittest
+ from spambl import DNSBL
  
  
  class DNSBLTest(unittest.TestCase):
-     pass
- 
- 
- 
+     
+     @classmethod
+     def setUpClass(cls):
+         code_item_class = {1: 'Class #1', 2: 'Class #2'}
+         query_suffix = 'query.suffix'
+         
+         cls.dnsbl = DNSBL('test.dnsbl', query_suffix, code_item_class, True, True)
+         
  if __name__ == "__main__":
      #import sys;sys.argv = ['', 'Test.testName']
      unittest.main()
Add setUpClass method to DNSBLTest
## Code Before:

import unittest


class DNSBLTest(unittest.TestCase):
    pass



if __name__ == "__main__":
    #import sys;sys.argv = ['', 'Test.testName']
    unittest.main()
## Instruction:
Add setUpClass method to DNSBLTest
## Code After:

import unittest
from spambl import DNSBL


class DNSBLTest(unittest.TestCase):
    
    @classmethod
    def setUpClass(cls):
        code_item_class = {1: 'Class #1', 2: 'Class #2'}
        query_suffix = 'query.suffix'
        
        cls.dnsbl = DNSBL('test.dnsbl', query_suffix, code_item_class, True, True)
        
if __name__ == "__main__":
    #import sys;sys.argv = ['', 'Test.testName']
    unittest.main()