Exemplo n.º 1
0
	def testInvalidYear(self):
		try:
			date = EVChartMacro.getDateFromTicket("20a2-01-01", 1)
		except:
			pass
		else:
			self.fail("Error expected")
Exemplo n.º 2
0
	def testInvalidMonth(self):
		try:
			date = EVChartMacro.getDateFromTicket("2012-13-01", 1)
		except:
			pass
		else:
			self.fail("Error expected")
Exemplo n.º 3
0
	def testInvalidFormat(self):
		try:
			date = EVChartMacro.getDateFromTicket("01-01-2012", 1)
		except:
			pass
		else:
			self.fail("Error expected")
Exemplo n.º 4
0
	def testDateStringTooSmall(self):
		try:
			date = EVChartMacro.getDateFromTicket("2012-01-1", 1)
		except:
			pass
		else:
			self.fail("Error expected")
Exemplo n.º 5
0
 def testValidDate(self):
     date = EVChartMacro.getEVDate(self.db.cursor(),
                                   TestCaseInformation.getTicketNumber())
     assert date.day == TestCaseInformation.getTicketEVDay(
     ), 'Incorrect day'
     assert date.month == TestCaseInformation.getTicketEVMonth(
     ), 'Incorrect month'
     assert date.year == TestCaseInformation.getTicketEVYear(
     ), 'Incorrect year'
Exemplo n.º 6
0
	def testNoValue(self):
		value = EVChartMacro.getValue(self.db.cursor(), -1)
		assert value == 0, 'Invalid value'
Exemplo n.º 7
0
	def testValidValue(self):
		value = EVChartMacro.getValue(self.db.cursor(), TestCaseInformation.getTicketNumber())
		assert value == TestCaseInformation.getTicketEstimatedHours(), 'Invalid value'
Exemplo n.º 8
0
 def testNoDate(self):
     date = EVChartMacro.getEVDate(self.db.cursor(), -1)
     assert date == NONE, 'Expected None type'
Exemplo n.º 9
0
	def testNoDate(self):
		date = EVChartMacro.getStartDate(self.db.cursor(), -1)
		assert date == None, 'Expected None type'
Exemplo n.º 10
0
	def testValidDate(self):
		date = EVChartMacro.getStartDate(self.db.cursor(), TestCaseInformation.getTicketNumber())
		assert date.day == TestCaseInformation.getTicketStartDay(), 'Incorrect day'
		assert date.month == TestCaseInformation.getTicketStartMonth(), 'Incorrect month'
		assert date.year == TestCaseInformation.getTicketStartYear(), 'Incorrect year'
Exemplo n.º 11
0
 def testValidDate(self):
     date = EVChartMacro.getPVDate(self.db.cursor(), TestCaseInformation.getTicketNumber())
     assert date.day == TestCaseInformation.getTicketPVDay(), "Incorrect day"
     assert date.month == TestCaseInformation.getTicketPVMonth(), "Incorrect month"
     assert date.year == TestCaseInformation.getTicketPVYear(), "Incorrect year"
Exemplo n.º 12
0
	def testValidDate(self):
		date = EVChartMacro.getDateFromTicket("2012-01-01", 1)
		assert date.day == 1, 'Incorrect day'
		assert date.month == 1, 'Incorrect month'
		assert date.year == 2012, 'Incorrect year'
Exemplo n.º 13
0
 def testNoValue(self):
     value = EVChartMacro.getValue(self.db.cursor(), -1)
     assert value == 0, 'Invalid value'
Exemplo n.º 14
0
 def testValidValue(self):
     value = EVChartMacro.getValue(self.db.cursor(),
                                   TestCaseInformation.getTicketNumber())
     assert value == TestCaseInformation.getTicketEstimatedHours(
     ), 'Invalid value'