diff --git a/horizon/tables/base.py b/horizon/tables/base.py index a0c70facd..4983c44cc 100644 --- a/horizon/tables/base.py +++ b/horizon/tables/base.py @@ -442,7 +442,7 @@ class Column(html.HTMLElement): summation_function = self.summation_methods[self.summation] data = [self.get_raw_data(datum) for datum in self.table.data] - data = filter(lambda datum: datum is not None, data) + data = [raw_data for raw_data in data if raw_data is not None] if len(data): try: @@ -605,7 +605,7 @@ class Row(html.HTMLElement): def get_cells(self): """Returns the bound cells for this row in order.""" - return self.cells.values() + return list(self.cells.values()) def get_ajax_update_url(self): table_url = self.table.get_absolute_url() @@ -1396,7 +1396,7 @@ class DataTable(object): """hide checkbox column if no current table action is allowed.""" if not self.multi_select: return - select_column = self.columns.values()[0] + select_column = list(self.columns.values())[0] # Try to find if the hidden class need to be # removed or added based on visible flag. hidden_found = 'hidden' in select_column.classes diff --git a/horizon/tabs/base.py b/horizon/tabs/base.py index 94d05f216..7a214967e 100644 --- a/horizon/tabs/base.py +++ b/horizon/tabs/base.py @@ -177,7 +177,7 @@ class TabGroup(html.HTMLElement): def get_tabs(self): """Returns a list of the allowed tabs for this tab group.""" - return filter(lambda tab: tab._allowed, self._tabs.values()) + return [tab for tab in self._tabs.values() if tab._allowed] def get_tab(self, tab_name, allow_disabled=False): """Returns a specific tab from this tab group. diff --git a/tox.ini b/tox.ini index 1c31f2e7b..e933eecda 100644 --- a/tox.ini +++ b/tox.ini @@ -27,6 +27,7 @@ commands = horizon.test.tests.messages \ horizon.test.tests.middleware \ horizon.test.tests.tables.DataTableViewTests \ + horizon.test.tests.tabs \ horizon.test.tests.templatetags \ horizon.test.tests.test_file_discovery \ horizon.test.tests.utils.FiltersTests \