Esempio n. 1
0
 def test_create_rename_delete(self):
     tree = Tree(alias='mytree')
     tree.save(force_insert=True)
     self.assertIsNotNone(tree.id)
     self.assertEqual(tree.alias, 'mytree')
     tree.alias = 'not_mytree'
     tree.save(force_update=True)
     self.assertEqual(tree.alias, 'not_mytree')
     tree.delete()
     self.assertIsNone(tree.id)
Esempio n. 2
0
 def test_create_rename_delete(self):
     tree = Tree(alias='mytree')
     tree.save(force_insert=True)
     self.assertIsNotNone(tree.id)
     self.assertEqual(tree.alias, 'mytree')
     tree.alias = 'not_mytree'
     tree.save(force_update=True)
     self.assertEqual(tree.alias, 'not_mytree')
     tree.delete()
     self.assertIsNone(tree.id)