Example #1
0
	def test_getByIdParams(self):
		b = Blibb()
		
		params = 't.i.w,u'
		bi = b.getByIdParams('4f7efbaef3a4180bad000000',params)

		print self.stripslashes(bi)
Example #2
0
	def test_isOwner(self):
		b = Blibb()
		self.assertTrue(b.isOwner('4f86fe04711ee0394b000015','ipedrazas'))
		self.assertFalse(b.isOwner('4f86ffd1711ee0394b000038','ipedrazas'))
		bl = Blitem()
		self.assertTrue(bl.isOwner('4f86ffd1711ee0394b000038','ipedrazas'))
		self.assertFalse(bl.isOwner('4f86fe04711ee0394b000015','ipedrazas'))
Example #3
0
	def test_insert(self):
		now = datetime.utcnow()
		b = Blibb()
		b.name = 'my name' + str(now)
		b.owner = 'ivan'
		b.desc = 'This is a description'
		b.template = '4f7f129df3a41813b0000000'
		b.date = now
		print b.insert(b.owner, b.name, b.desc, b.template, False, '')