Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. import consol_run_parameter as run_parameter
  2. class Base_Test1:
  3.  
  4. CONST_1 = Undefine()
  5. CONST_2 = Undefine()
  6.  
  7.  
  8. def setup_class(cls):
  9. pass
  10.  
  11. def setup(self):
  12. pass
  13.  
  14. def teardown_class(cls):
  15. pass
  16.  
  17. def teardown(self):
  18. pass
  19.  
  20. def _test_check_feature(self):
  21. pass
  22.  
  23.  
  24. # product a
  25. class Test_1(Base_Test1):
  26.  
  27. CONST_1 = 1
  28. CONST_2 = 2
  29. MAX_CONNECTION = 1000
  30.  
  31. def setup_class(cls):
  32. if run_parameter.security:
  33. # przyjmij do testu inne ilimity, wyrocznie itp
  34. # wykonaj dodatkowe metody
  35. cls.security = Security_feature
  36. cls.MAX_CONNECTION = cls.security.MAX_CONNECTION
  37. else:
  38. pass
  39.  
  40. def setup(self):
  41. if self.security != None:
  42. self.security.set_rules()
  43. pass
  44.  
  45. def teardown(self):
  46. pass
  47.  
  48. def teardown(self):
  49. pass
  50.  
  51. def test_check_feature(self):
  52. # zrob cos specyficznego dla tego produktu
  53. Base_Test1._test_check_feature()
  54.  
  55.  
  56. class Security_feature:
  57.  
  58. MAX_CONNECTION = 100
  59.  
  60. def set_rules(self):
  61. pass
  62.  
  63.  
  64. # uruchomienie bez funkcjonalnsci
  65. # python Test_1
  66.  
  67. # uruchomienie z funkcjonalnicia
  68. # python Test_1 -security
  69.  
  70. # funcjonalnosc security moze miec wiele produktow
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement