示例#1
0
	def test_some_strings (self):
		''' any string must end in a slash if it hasn't any '''
		for string, string2 in self.known_values:
			result = PhotodeliverII.addslash(string)
			self.assertEqual (string2, result)
示例#2
0
	def test_known_values (self):
		for string1, match in self.known_values:
			result = PhotodeliverII.findeventname (string1)
			self.assertEqual (match, result)
示例#3
0
	def test_to2 (self):
		'''Testing all digits 1 to 12), should return a string with two characters'''
		for integer, string in self.known_values:
			result = PhotodeliverII.to2 (integer)
			self.assertEqual(string, result)
示例#4
0
	def test_known_values (self):
		for string1, match in self.known_values:
			result = PhotodeliverII.mediainfo (string1, False)
			self.assertEqual (match, result)
示例#5
0
	def test_known_values (self):
		for string1, match in self.known_values:
			result = PhotodeliverII.serieserial (string1)
			self.assertEqual (match, result)
示例#6
0
	def test_known_values (self):
		for string1, match in self.known_values:
			result = PhotodeliverII.yearmonthdayfinder (string1)
			self.assertEqual (match, result)
示例#7
0
	def test_known_input(self):
		for dirpath, childlist in self.known_values:
			result = PhotodeliverII.lsdirectorytree (dirpath)
			self.assertEqual (set(childlist), set(result))
示例#8
0
	def test_emptystring (self):
		''' an empty string returns another empty string'''
		self.assertEqual (PhotodeliverII.itemcheck(""),"")