@@ -20,6 +20,7 @@ def test_bot(self):
2020 )
2121 self .assertIsNotNone (bot )
2222 self .assertIsNotNone (bot .to_dict ())
23+ self .assertIsNotNone (bot .to_dict_for_copying ())
2324
2425 def test_bot_custom_fields (self ):
2526 bot = Bot (
@@ -33,6 +34,7 @@ def test_bot_custom_fields(self):
3334 bot .set_custom_value ("app_id" , "A222" )
3435 self .assertEqual (bot .get_custom_value ("service_user_id" ), "XYZ123" )
3536 self .assertEqual (bot .to_dict ().get ("service_user_id" ), "XYZ123" )
37+ self .assertEqual (bot .to_dict_for_copying ().get ("custom_values" ).get ("service_user_id" ), "XYZ123" )
3638
3739 def test_installation (self ):
3840 installation = Installation (
@@ -73,10 +75,12 @@ def test_installation_custom_fields(self):
7375 self .assertEqual (installation .get_custom_value ("service_user_id" ), "XYZ123" )
7476 self .assertEqual (installation .to_dict ().get ("service_user_id" ), "XYZ123" )
7577 self .assertEqual (installation .to_dict ().get ("app_id" ), "A111" )
78+ self .assertEqual (installation .to_dict_for_copying ().get ("custom_values" ).get ("app_id" ), "A222" )
7679
7780 bot = installation .to_bot ()
7881 self .assertEqual (bot .app_id , "A111" )
7982 self .assertEqual (bot .get_custom_value ("service_user_id" ), "XYZ123" )
8083
8184 self .assertEqual (bot .to_dict ().get ("app_id" ), "A111" )
8285 self .assertEqual (bot .to_dict ().get ("service_user_id" ), "XYZ123" )
86+ self .assertEqual (bot .to_dict_for_copying ().get ("custom_values" ).get ("app_id" ), "A222" )
0 commit comments