HCE Project Python language Distributed Tasks Manager Application, Distributed Crawler Application and client API bindings.  2.0.0-chaika
Hierarchical Cluster Engine Python language binding
ftests.ftest_DTMA.TestDTMA Class Reference

Class TestDTMA, contains functional tests of DTMA module. More...

Inheritance diagram for ftests.ftest_DTMA.TestDTMA:
Collaboration diagram for ftests.ftest_DTMA.TestDTMA:

Public Member Functions

def __init__ (self, methodName='runTest')
 
def setUp (self)
 
def tearDown (self)
 
def commonTestCode (self, args, isZerro)
 
def testFunctionalHELP (self)
 
def testFunctionalSTATBadConfig (self)
 
def testFunctionalSTATBad1 (self)
 
def testFunctionalSTAT (self)
 
def testFunctionalSETBad (self)
 
def testFunctionalSET (self)
 
def testFunctionalGETBad (self)
 
def testFunctionalGET (self)
 
def testFunctionalSTOPBad (self)
 
def testFunctionalSTOP (self)
 

Public Attributes

 dtmc
 
 connectionBuilderMock
 
 dtma
 

Detailed Description

Class TestDTMA, contains functional tests of DTMA module.

Definition at line 69 of file ftest_DTMA.py.

Constructor & Destructor Documentation

◆ __init__()

def ftests.ftest_DTMA.TestDTMA.__init__ (   self,
  methodName = 'runTest' 
)

Definition at line 72 of file ftest_DTMA.py.

72  def __init__(self, methodName='runTest'):
73  unittest.TestCase.__init__(self, methodName)
74  self.dtmc = None
75  self.connectionBuilderMock = None
76 
77 
def __init__(self)
constructor
Definition: UIDGenerator.py:19

Member Function Documentation

◆ commonTestCode()

def ftests.ftest_DTMA.TestDTMA.commonTestCode (   self,
  args,
  isZerro 
)

Definition at line 88 of file ftest_DTMA.py.

88  def commonTestCode(self, args, isZerro):
89  exitCode = None
90  self.dtma = DTMA()
91  self.dtma.connectionBuilder = self.connectionBuilderMock
92  DTMA.argv = args
93  self.dtma.setup()
94  try:
95  self.dtma.run()
96  except SystemExit as excp:
97  print("\nEXIT CODE >>> " + str(excp.message))
98  exitCode = excp.message
99  self.dtma.close()
100  if isZerro:
101  self.assertTrue(exitCode == 0, ">>> Error! Exit code != 0")
102  else:
103  self.assertTrue(exitCode != 0, ">>> Error! Exit code == 0")
104 
105 
Here is the caller graph for this function:

◆ setUp()

def ftests.ftest_DTMA.TestDTMA.setUp (   self)

Definition at line 78 of file ftest_DTMA.py.

78  def setUp(self):
79  self.dtmc = None
80  self.connectionBuilderMock = MagicMock(spec=ConnectionBuilderLight)
81  self.connectionBuilderMock.build.side_effect = connectionBuilderMockBuild
82 
83 

◆ tearDown()

def ftests.ftest_DTMA.TestDTMA.tearDown (   self)

Definition at line 84 of file ftest_DTMA.py.

84  def tearDown(self):
85  pass
86 
87 

◆ testFunctionalGET()

def ftests.ftest_DTMA.TestDTMA.testFunctionalGET (   self)

Definition at line 145 of file ftest_DTMA.py.

145  def testFunctionalGET(self):
146  print("testFunctionalGET TEST START >>> \n")
147  self.commonTestCode(["--cmd", "GET", "--fields", "any", "--classes", "cl1,cl2", "--config", "./dtma.ini"], True)
148 
149 
Here is the call graph for this function:

◆ testFunctionalGETBad()

def ftests.ftest_DTMA.TestDTMA.testFunctionalGETBad (   self)

Definition at line 140 of file ftest_DTMA.py.

140  def testFunctionalGETBad(self):
141  print("testFunctionalGETBad TEST START >>> \n")
142  self.commonTestCode(["--cmd", "GET", "--fields", "", "--classes", "cl1,cl2", "--config", "./dtma.ini"], False)
143 
144 
Here is the call graph for this function:

◆ testFunctionalHELP()

def ftests.ftest_DTMA.TestDTMA.testFunctionalHELP (   self)

Definition at line 106 of file ftest_DTMA.py.

106  def testFunctionalHELP(self):
107  print("HELP TEST START >>> \n")
108  self.commonTestCode(["-h"], True)
109 
110 
Here is the call graph for this function:

◆ testFunctionalSET()

def ftests.ftest_DTMA.TestDTMA.testFunctionalSET (   self)

Definition at line 134 of file ftest_DTMA.py.

134  def testFunctionalSET(self):
135  print("testFunctionalSET TEST START >>> \n")
136  self.commonTestCode(["--cmd", "SET", "--fields", "cl1:cl2,cl4:", "--classes", "cl1,cl2",
137  "--config", "./dtma.ini"], True)
138 
139 
Here is the call graph for this function:

◆ testFunctionalSETBad()

def ftests.ftest_DTMA.TestDTMA.testFunctionalSETBad (   self)

Definition at line 129 of file ftest_DTMA.py.

129  def testFunctionalSETBad(self):
130  print("testFunctionalSETBad TEST START >>> \n")
131  self.commonTestCode(["--cmd", "SET", "--fields", "cl1,cl2","--classes", "cl1,cl2", "--config", "./dtma.ini"], False)
132 
133 
Here is the call graph for this function:

◆ testFunctionalSTAT()

def ftests.ftest_DTMA.TestDTMA.testFunctionalSTAT (   self)

Definition at line 121 of file ftest_DTMA.py.

121  def testFunctionalSTAT(self):
122  print("testFunctionalSTAT TEST START >>> \n")
123 # self.commonTestCode(["--cmd", "STAT", "--fields", "adda1", "--classes", "cl1,cl2", "--config", "./dtma.ini"])
124 # "--fields", "Adm:,adm2:33,adm4",
125  self.commonTestCode(["--cmd", "STAT", "--classes",
126  "TasksManager,ExecutionEnvironmentManager ", "--config", "./dtma.ini"], True)
127 
128 
Here is the call graph for this function:

◆ testFunctionalSTATBad1()

def ftests.ftest_DTMA.TestDTMA.testFunctionalSTATBad1 (   self)

Definition at line 116 of file ftest_DTMA.py.

116  def testFunctionalSTATBad1(self):
117  print("testFunctionalSTATBad1 TEST START >>> \n")
118  self.commonTestCode(["--cmd", "STAT", "--config", "./dtma.ini"], False)
119 
120 
Here is the call graph for this function:

◆ testFunctionalSTATBadConfig()

def ftests.ftest_DTMA.TestDTMA.testFunctionalSTATBadConfig (   self)

Definition at line 111 of file ftest_DTMA.py.

111  def testFunctionalSTATBadConfig(self):
112  print("testFunctionalSTATBadConfig TEST START >>> \n")
113  self.commonTestCode(["--cmd", "STAT", "--config", "./bad"], False)
114 
115 
Here is the call graph for this function:

◆ testFunctionalSTOP()

def ftests.ftest_DTMA.TestDTMA.testFunctionalSTOP (   self)

Definition at line 155 of file ftest_DTMA.py.

155  def testFunctionalSTOP(self):
156  print("testFunctionalSTOP TEST START >>> \n")
157  self.commonTestCode(["--cmd", "STOP","--classes", "cl1,cl2", "--config", "./dtma.ini"], True)
158 
159 
Here is the call graph for this function:

◆ testFunctionalSTOPBad()

def ftests.ftest_DTMA.TestDTMA.testFunctionalSTOPBad (   self)

Definition at line 150 of file ftest_DTMA.py.

150  def testFunctionalSTOPBad(self):
151  print("testFunctionalSTOPBad TEST START >>> \n")
152  self.commonTestCode(["--cmd", "STOP", "--classes", "", "--config", "./dtma.ini"], False)
153 
154 
Here is the call graph for this function:

Member Data Documentation

◆ connectionBuilderMock

ftests.ftest_DTMA.TestDTMA.connectionBuilderMock

Definition at line 75 of file ftest_DTMA.py.

◆ dtma

ftests.ftest_DTMA.TestDTMA.dtma

Definition at line 90 of file ftest_DTMA.py.

◆ dtmc

ftests.ftest_DTMA.TestDTMA.dtmc

Definition at line 74 of file ftest_DTMA.py.


The documentation for this class was generated from the following file: