Пример #1
0
	def test_add_and_retreive_quote(self):
		"""
		Try adding a quote, then retrieving it
		"""
		id = str(uuid.uuid4())
		quote = "So I says to Mabel, I says, %s" % id
		res = quotes.quote("add %s" % quote)
		assert res == "Quote added!"
		cursor = logging.Logger.store.db.cursor()
		cursor.execute("select count(*) from quotes where library = 'pmx' and quote = ?", (quote,))
		numquotes = cursor.fetchone()[0]
		assert numquotes == 1

		res = quotes.quote(id)
		assert res == "(1/1): %s" % quote
Пример #2
0
	def test_add_and_retreive_quote(self):
		"""
		Try adding a quote, then retrieving it
		"""
		id = str(uuid.uuid4())
		quote = "So I says to Mabel, I says, %s" % id
		res = quotes.quote("add %s" % quote)
		assert res == "Quote added!"
		cursor = logging.Logger.store.db.cursor()
		cursor.execute("select count(*) from quotes where library = 'pmx' and quote = ?", (quote,))
		numquotes = cursor.fetchone()[0]
		assert numquotes == 1

		res = quotes.quote(id)
		assert res == "(1/1): %s" % quote
Пример #3
0
	def test_add_quote(self):
		"""
		Try adding a quote
		"""
		quote = "And then she said %s" % str(uuid.uuid4())
		res = quotes.quote("add %s" % quote)
		assert res == "Quote added!"
		cursor = logging.Logger.store.db.cursor()
		cursor.execute("select count(*) from quotes where library = 'pmx' and quote = ?", (quote,))
		numquotes = cursor.fetchone()[0]
		assert numquotes == 1
Пример #4
0
	def test_add_quote(self):
		"""
		Try adding a quote
		"""
		quote = "And then she said %s" % str(uuid.uuid4())
		res = quotes.quote("add %s" % quote)
		assert res == "Quote added!"
		cursor = logging.Logger.store.db.cursor()
		cursor.execute("select count(*) from quotes where library = 'pmx' and quote = ?", (quote,))
		numquotes = cursor.fetchone()[0]
		assert numquotes == 1