@@ -177,7 +177,25 @@ def test_conversion_to_dict(self):
177177 assert dialog_dict ["parties" ] == [1 , 2 ]
178178 assert dialog_dict ["party_history" ] == [{"party" : 1 , "event" : "join" , "time" : party_time }]
179179
180- # Successfully fetches external data from a valid URL
180+
181+ # Test the meta variable in the dialog
182+ def test_meta_variable_in_dialog (self ):
183+ from datetime import datetime
184+ from src .vcon .dialog import Dialog
185+
186+ type = "audio"
187+ start = datetime .now ()
188+ parties = [1 , 2 ]
189+ meta = {"key" : "value" }
190+
191+ dialog = Dialog (type = type , start = start , parties = parties , meta = meta )
192+
193+ assert dialog .type == type
194+ assert dialog .start == start
195+ assert dialog .parties == parties
196+ assert dialog .meta == meta
197+
198+ # Successfully fetches external data from a valid URL
181199 def test_fetch_external_data_success (self , mocker ):
182200 # Arrange
183201 dialog = Dialog (type = "text" , start = "2023-06-01T10:00:00Z" , parties = [0 ])
@@ -308,4 +326,4 @@ def test_encoding_base64url(self):
308326 dialog .add_inline_data ("example_body" , "example_filename" , "text/plain" )
309327
310328 # Check if the encoding is set to "base64url"
311- assert dialog .encoding == "base64url"
329+ assert dialog .encoding == "base64url"
0 commit comments