@@ -60,18 +60,21 @@ def test_get_tag_map(self):
6060 view_data = view_data_module .ViewData (view = view ,
6161 start_time = start_time ,
6262 end_time = end_time )
63- test_context_1 = {'key1' : 'val1' }
63+ test_context_1 = mock .Mock ()
64+ test_context_1 .map = {'key1' : 'val1' }
6465 context_map_1 = view_data .get_tag_map (context = test_context_1 )
65- self .assertEqual (test_context_1 , view_data .tag_map )
66- self .assertEqual (test_context_1 , context_map_1 )
66+ self .assertEqual (test_context_1 . map , view_data .tag_map )
67+ self .assertEqual (test_context_1 . map , context_map_1 )
6768
68- test_context_2 = {'key1' : 'val2' }
69+ test_context_2 = mock .Mock ()
70+ test_context_2 .map = {'key1' : 'val2' }
6971 context_map_2 = view_data .get_tag_map (context = test_context_2 )
70- self .assertEqual (test_context_2 , context_map_2 )
72+ self .assertEqual (test_context_2 . map , context_map_2 )
7173
72- test_context_3 = {}
74+ test_context_3 = mock .Mock ()
75+ test_context_3 .map = {}
7376 context_map_3 = view_data .get_tag_map (context = test_context_3 )
74- self .assertEqual ({ 'key1' : 'val2' } , context_map_3 )
77+ self .assertEqual (test_context_2 . map , context_map_3 )
7578
7679 def test_get_tag_values (self ):
7780 view = mock .Mock ()
@@ -101,7 +104,8 @@ def test_record(self):
101104 start_time = start_time ,
102105 end_time = end_time )
103106
104- context = {'key1' : 'val1' , 'key2' : 'val2' }
107+ context = mock .Mock ()
108+ context .map = {'key1' : 'val1' , 'key2' : 'val2' }
105109 time = datetime .utcnow ().isoformat () + 'Z'
106110 value = 1
107111 self .assertEqual ({}, view_data .tag_value_aggregation_map )
0 commit comments