def test_text_formatting_for_boards_modified(self): mock_online_boards, mock_offline_boards = _make_mbed_boards_for_diff( [BOARD_2], [BOARD_2_MODIFIED]) result = sync_board_database.compare_databases( online_boards=mock_online_boards, offline_boards=mock_offline_boards) text = sync_board_database.create_news_file_text_from_result(result) self.assertEqual( text, f"Targets modified: {BOARD_2['attributes']['name']}.\n", "Text is formatted correctly.", )
def test_text_formatting_for_boards_removed(self): mock_online_boards, mock_offline_boards = _make_mbed_boards_for_diff( [], [BOARD_1, BOARD_2]) result = sync_board_database.determine_board_database_update_result( online_boards=mock_online_boards, offline_boards=mock_offline_boards) text = sync_board_database.create_news_file_text_from_result(result) self.assertEqual( text, f"Targets removed: {BOARD_2['attributes']['name']}, {BOARD_1['attributes']['name']}.\n", "Text is formatted correctly.", )