'Verify S3DashboardContext recognizes URL format extension'

def testFormatExtension(self):

    request = current.request
    request._get_vars = Storage()
    assertEqual = self.assertEqual
    request.extension = 'json'
    request.args = ['command', '1']
    context = S3DashboardContext()
    assertEqual(context.representation, 'json')
    request.extension = 'json'
    request.args = ['command.xml', '1']
    context = S3DashboardContext()
    assertEqual(context.representation, 'xml')
    request.extension = 'json'
    request.args = ['command.xml', '1.pdf']
    context = S3DashboardContext()
    assertEqual(context.representation, 'pdf')
