@@ -1019,6 +1019,53 @@ def test_video_Show_streamingServices(show):
10191019 assert show .streamingServices ()
10201020
10211021
1022+ def test_video_Show_commonSenseMedia (show ):
1023+ commonSenseMedia = show .commonSenseMedia [0 ]
1024+ assert utils .is_int (commonSenseMedia .id )
1025+ assert commonSenseMedia .oneLiner
1026+
1027+ ageRating = commonSenseMedia .ageRatings [0 ]
1028+ assert ageRating .type == 'official'
1029+ assert utils .is_float (ageRating .age , gte = 0.0 )
1030+ assert utils .is_float (ageRating .rating , gte = 0.0 )
1031+
1032+
1033+ @pytest .mark .authenticated
1034+ def test_video_Show_commonSenseMedia_full (account_plexpass , show ):
1035+ commonSenseMedia = show .commonSenseMedia [0 ]
1036+ commonSenseMedia .reload ()
1037+ assert commonSenseMedia .anyGood
1038+ assert commonSenseMedia .key
1039+ assert commonSenseMedia .oneLiner
1040+ assert commonSenseMedia .parentsNeedToKnow
1041+
1042+ ageRatings = commonSenseMedia .ageRatings
1043+ assert len (ageRatings ) == 3
1044+ types = {r .type for r in ageRatings }
1045+ assert types == {'official' , 'child' , 'adult' }
1046+ ageRating = next (r for r in ageRatings if r .type == 'official' )
1047+ assert utils .is_float (ageRating .age , gte = 0.0 )
1048+ if ageRating .ageGroup is not None :
1049+ assert ageRating .ageGroup
1050+ assert utils .is_float (ageRating .rating , gte = 0.0 )
1051+ if ageRating .ratingCount is not None :
1052+ assert utils .is_int (ageRating .ratingCount , gte = 0 )
1053+
1054+ talkingPoints = commonSenseMedia .talkingPoints
1055+ assert len (talkingPoints )
1056+ talkingPoint = talkingPoints [0 ]
1057+ assert talkingPoint .tag
1058+
1059+ parentalAdvisoryTopics = commonSenseMedia .parentalAdvisoryTopics
1060+ assert len (parentalAdvisoryTopics )
1061+ parentalAdvisoryTopic = parentalAdvisoryTopics [0 ]
1062+ assert parentalAdvisoryTopic .id
1063+ assert parentalAdvisoryTopic .label
1064+ assert utils .is_bool (parentalAdvisoryTopic .positive )
1065+ assert utils .is_float (parentalAdvisoryTopic .rating , gte = 0.0 )
1066+ assert parentalAdvisoryTopic .tag
1067+
1068+
10221069def test_video_Season (show ):
10231070 seasons = show .seasons ()
10241071 assert len (seasons ) == 2
0 commit comments