Skip to content

Commit

Permalink
[vstest]: fix vstest for python3 (#1354)
Browse files Browse the repository at this point in the history
explicitly conver the items to list instead of dict_items

Signed-off-by: Guohan Lu <lguohan@gmail.com>
  • Loading branch information
lguohan committed Jul 18, 2020
1 parent ffa0dc3 commit 982c9a3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/dvslib/dvs_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def create_entry(self, table_name, key, entry):
"""

table = swsscommon.Table(self.db_connection, table_name)
formatted_entry = swsscommon.FieldValuePairs(entry.items())
formatted_entry = swsscommon.FieldValuePairs(list(entry.items()))
table.set(key, formatted_entry)

def update_entry(self, table_name, key, entry):
Expand All @@ -54,7 +54,7 @@ def update_entry(self, table_name, key, entry):
"""

table = swsscommon.Table(self.db_connection, table_name)
formatted_entry = swsscommon.FieldValuePairs(entry.items())
formatted_entry = swsscommon.FieldValuePairs(list(entry.items()))
table.set(key, formatted_entry)

def get_entry(self, table_name, key):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_qos_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def connect_dbs(self, dvs):

def create_dot1p_profile(self):
tbl = swsscommon.Table(self.config_db, CFG_DOT1P_TO_TC_MAP_TABLE_NAME)
fvs = swsscommon.FieldValuePairs(DOT1P_TO_TC_MAP.items())
fvs = swsscommon.FieldValuePairs(list(DOT1P_TO_TC_MAP.items()))
tbl.set(CFG_DOT1P_TO_TC_MAP_KEY, fvs)
time.sleep(1)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_tunnel.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


def create_fvs(**kwargs):
return swsscommon.FieldValuePairs(kwargs.items())
return swsscommon.FieldValuePairs(list(kwargs.items()))


class TestTunnelBase(object):
Expand Down

0 comments on commit 982c9a3

Please sign in to comment.