<s> import re <EOL> from unittest import TestCase <EOL> from embed_video . backends import VideoBackend , detect_backend <EOL> class CustomBackend ( VideoBackend ) : <EOL> re_detect = re . compile ( r'<STR_LIT>' ) <EOL> re_code = re . compile ( r'<STR_LIT>' ) <EOL> pattern_url = '<STR_LIT>' <EOL> pattern_thumbnail_url = '<STR_LIT>' <EOL> class CustomBackendTestCase ( TestCase ) : <EOL> def setUp ( self ) : <EOL> self . backend = detect_backend ( '<STR_LIT>' ) <EOL> def test_detect_backend ( self ) : <EOL> self . assertIsInstance ( self . backend , CustomBackend ) <EOL> def test_code ( self ) : <EOL> self . assertEqual ( self . backend . code , '<STR_LIT>' ) <EOL> def test_url ( self ) : <EOL> self . assertEqual ( self . backend . get_url ( ) , <EOL> '<STR_LIT>' ) <EOL> def test_url_https ( self ) : <EOL> self . backend . is_secure = True <EOL> self . assertEqual ( self . backend . get_url ( ) , <EOL> '<STR_LIT>' ) <EOL> def test_thumbnail ( self ) : <EOL> self . assertEqual ( self . backend . get_thumbnail_url ( ) , <EOL> '<STR_LIT>' ) </s>
