test = {'name': 'q1',
 'points': 1,
 'suites': [{'cases': [{'code': '>>> hacker = cat([1,2], 2)\n'
                                '\n'
                                '>>> hacker(1)\n'
                                '\n'
                                '>>> hacker(2)\n'
                                "'Successfully unlocked!'\n"
                                '\n'
                                '>>> hacker = cat([1,2], 1)\n'
                                '\n'
                                '>>> hacker(1)\n'
                                '\n'
                                '>>> hacker(3) # used up attempts to gain '
                                'access\n'
                                '\n'
                                '>>> hacker(2) # correct attempt to gain '
                                'access, but already locked\n'
                                "'The safe is now inaccessible!'\n"
                                '\n'
                                '>>> hacker = cat([1,2], 2)\n'
                                '\n'
                                '>>> hacker(1)\n'
                                '\n'
                                '>>> hacker(3) # 1 attempt left to gain '
                                'access\n'
                                '\n'
                                '>>> hacker(2) # correct attempt to gain '
                                'access\n'
                                "'Successfully unlocked!'\n"}],
             'scored': True,
             'setup': 'from q1 import *',
             'type': 'doctest'},
            {'cases': [{'code': '>>> hacker = cat([1], 4)\n'
                                '\n'
                                '>>> hacker(3)\n'
                                '\n'
                                '>>> hacker(3)\n'
                                '\n'
                                '>>> hacker(3)\n'
                                '\n'
                                '>>> hacker(3)\n'
                                '\n'
                                '>>> hacker(3)\n'
                                "'The safe is now inaccessible!'\n"
                                '\n'
                                '>>> hacker = cat([1], 4)\n'
                                '\n'
                                '>>> hacker(3)\n'
                                '\n'
                                '>>> hacker(3)\n'
                                '\n'
                                '>>> hacker(3)\n'
                                '\n'
                                '>>> hacker(3)\n'
                                '\n'
                                '>>> hacker(1)\n'
                                "'The safe is now inaccessible!'\n"
                                '\n'
                                '>>> hacker = cat([1], 4)\n'
                                '\n'
                                '>>> hacker(1)\n'
                                "'Successfully unlocked!'\n"
                                '\n'
                                '>>> hacker = cat([1, 2, 3, 4, 5, 6], 4)\n'
                                '\n'
                                '>>> hacker(1)\n'
                                '\n'
                                '>>> hacker(2)\n'
                                '\n'
                                '>>> hacker(3)\n'
                                '\n'
                                '>>> hacker(4)\n'
                                '\n'
                                '>>> hacker(5)\n'
                                '\n'
                                '>>> hacker(6)\n'
                                "'Successfully unlocked!'\n"
                                '\n'
                                '>>> hacker = cat([1,2,3,4], 2)\n'
                                '\n'
                                '>>> hacker(1)\n'
                                '\n'
                                '>>> hacker(2)\n'
                                '\n'
                                '>>> hacker(3)\n'
                                '\n'
                                '>>> hacker(3)\n'
                                '\n'
                                '>>> hacker(4)\n'
                                "'Successfully unlocked!'\n"}],
             'scored': True,
             'setup': 'from q1 import *',
             'type': 'doctest'}]}