#NEWLINE# def test_urls_can_have_trailing_slash_removed( self ) : #NEWLINE# #INDENT# router = ExtendedSimpleRouter ( trailing_slash = False ) #NEWLINE# router . register ( 'router-viewset' , RouterViewSet ) #NEWLINE# urls = router . urls #NEWLINE# lookup_allowed_symbols = get_lookup_allowed_symbols ( force_dot = get_rest_framework_features ( ) [ 'allow_dot_in_lookup_regex_without_trailing_slash' ] ) #NEWLINE# for exp in [ '^router-viewset$' , '^router-viewset/{0}$' . format ( lookup_allowed_symbols ) , '^router-viewset/list_controller$' , '^router-viewset/{0}/detail_controller$' . format ( lookup_allowed_symbols ) ] : #NEWLINE# #INDENT# msg = ( 'Should find url pattern with regexp %s' % exp ) #NEWLINE# self . assertIsNotNone ( get_url_pattern_by_regex_pattern ( urls , exp ) , msg = router )