Пример #1
0
 def test_save_as_template(self):
     title = helpers.word()
     description = helpers.word()
     helpers.set_dummy_context()
     board = helpers.create_board()
     user = helpers.create_user()
     helpers.set_context(user)
     boards_manager = helpers.get_boards_manager()
     template = boards_manager.create_template_from_board(board, title, description, False)
     self.assertEqual(template.data.title, title)
     self.assertEqual(template.data.description, description)
     self.assertTrue(template.data.is_template)
     self.assertEqual(template.data.visibility, board_module.BOARD_PRIVATE)
     template = boards_manager.create_template_from_board(board, title, description, True)
     self.assertEqual(template.data.visibility, board_module.BOARD_PUBLIC)
Пример #2
0
 def test_save_as_template(self):
     title = helpers.word()
     description = helpers.word()
     helpers.set_dummy_context()
     board = helpers.create_board()
     user = helpers.create_user()
     helpers.set_context(user)
     boards_manager = helpers.get_boards_manager()
     template = boards_manager.create_template_from_board(board, title, description, False)
     self.assertEqual(template.data.title, title)
     self.assertEqual(template.data.description, description)
     self.assertTrue(template.data.is_template)
     self.assertEqual(template.data.visibility, board_module.BOARD_PRIVATE)
     template = boards_manager.create_template_from_board(board, title, description, True)
     self.assertEqual(template.data.visibility, board_module.BOARD_PUBLIC)
Пример #3
0
 def test_add_column_ok(self):
     """Add a column to a board"""
     helpers.set_dummy_context()
     board = helpers.create_board()
     self.assertIsNotNone(board.archive_column)
     self.assertEqual(board.count_columns(), 4)
     board.create_column(0, helpers.word())
     self.assertEqual(board.count_columns(), 5)
Пример #4
0
 def test_add_column_ok(self):
     """Add a column to a board"""
     helpers.set_dummy_context()
     board = helpers.create_board()
     self.assertIsNotNone(board.archive_column)
     self.assertEqual(board.count_columns(), 4)
     board.create_column(0, helpers.word())
     self.assertEqual(board.count_columns(), 5)