How to use the getgauge.processor.process_cache_file_request function in getgauge

To help you get started, we’ve selected a few getgauge examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github getgauge / gauge-python / tests / test_processor.py View on Github external
        @step('foo1')
        def foo():
            pass
        ''')

        request.filePath = 'foo.py'
        request.status = CacheFileRequest.CLOSED
        self.fs.create_file('foo.py', contents=dedent('''\
        from getgauge.python import step

        @step('foo ')
        def foo():
            pass
        '''))
        processor.process_cache_file_request(request)

        self.assertEqual(registry.is_implemented('foo1'), False)
        self.assertEqual(registry.is_implemented('foo {}'), True)
github getgauge / gauge-python / tests / test_processor.py View on Github external
def test_Processor_cache_file_with_delete_status(self):
        request = CacheFileRequest()
        self.load_content_steps('''\
        from getgauge.python import step

        @step('foo1')
        def foo():
            pass
        ''')

        request.filePath = 'foo.py'
        request.status = CacheFileRequest.DELETED

        processor.process_cache_file_request(request)

        self.assertEqual(registry.is_implemented('foo1'), False)
github getgauge / gauge-python / tests / test_processor.py View on Github external
def test_Processor_cache_file_with_create_status_when_file_is_cached(self):
        request = CacheFileRequest()
        self.load_content_steps('''\
        from getgauge.python import step

        @step('foo ')
        def foo():
            pass
        ''')

        self.assertEqual(registry.is_implemented('foo {}'), True)

        request.filePath = 'foo.py'
        request.status = CacheFileRequest.CREATED
        self.fs.create_file('foo.py')
        processor.process_cache_file_request(request)

        self.assertEqual(registry.is_implemented('foo {}'), True)
github getgauge / gauge-python / tests / test_processor.py View on Github external
        @step('foo1')
        def foo():
            pass
        ''')

        request.filePath = 'foo.py'
        request.content = dedent('''\
        from getgauge.python import step

        @step('foo ')
        def foo():
            pass
        ''')
        request.status = CacheFileRequest.OPENED

        processor.process_cache_file_request(request)

        self.assertEqual(registry.is_implemented('foo1'), False)
        self.assertEqual(registry.is_implemented('foo {}'), True)
github getgauge / gauge-python / tests / test_processor.py View on Github external
print(vowels)
        ''')

        self.assertTrue(registry.is_implemented(
            'Vowels in English language are {}.'))

        content = dedent('''\
        from getgauge.python import step

        @step('get lost!')
        def foo():
            pass
        ''')
        req = CacheFileRequest(
            content=content, filePath='foo.py', status=CacheFileRequest.CHANGED)
        processor.process_cache_file_request(req)

        self.assertTrue(registry.is_implemented('get lost!'))
github getgauge / gauge-python / tests / test_processor.py View on Github external
def test_Processor_cache_file_with_create_status(self):
        request = CacheFileRequest()

        request.filePath = 'foo.py'
        request.status = CacheFileRequest.CREATED
        self.fs.create_file('foo.py', contents=dedent('''\
        from getgauge.python import step

        @step('foo ')
        def foo():
            pass
        '''))
        processor.process_cache_file_request(request)

        self.assertEqual(registry.is_implemented('foo {}'), True)
github getgauge / gauge-python / tests / test_processor.py View on Github external
        @step('foo1')
        def foo():
            pass
        ''')

        request.filePath = 'foo.py'
        request.content = dedent('''\
        from getgauge.python import step

        @step('foo ')
        def foo():
            pass
        ''')
        request.status = CacheFileRequest.CHANGED

        processor.process_cache_file_request(request)

        self.assertEqual(registry.is_implemented('foo1'), False)
        self.assertEqual(registry.is_implemented('foo {}'), True)
github getgauge / gauge-python / getgauge / handlers.py View on Github external
def CacheFile(self, request, context):
        return processor.process_cache_file_request(request)