accounts/tests.py::TestSelectedInstance::test_selected_instance_slash_truncate

First seen 1 year, 1 month ago in commit 1cd3a pushed by Anže Pečar

Last 100 Runs
Pass % 100.0%
p50 duration 0.1699s
p95 duration 0.2089s

81 runs 81 passed in the last 30 days

Run 5 months, 1 week ago
Status FAIL
Commit

Update dependencies

Commit ec5d7 pushed by Anže Pečar
Repr
self = <Parser tokens=[<Text token: "...">, <Block token: "endblock sidebar...">, <Text token: "            </ul> ...">, <Blo...xt token: ""                  ...">, <Block token: "static selected_lang...">, <Text token: ""               cla...">]>
parse_until = ('elif', 'else', 'endif')

    def parse(self, parse_until=None):
        """
        Iterate through the parser tokens and compiles each one into a node.
    
        If parse_until is provided, parsing will stop once one of the
        specified tokens has been reached. This is formatted as a list of
        tokens, e.g. ['elif', 'else', 'endif']. If no matching token is
        reached, raise an exception with the unclosed block tag details.
        """
        if parse_until is None:
            parse_until = []
        nodelist = NodeList()
        while self.tokens:
            token = self.next_token()
            # Use the raw values here for TokenType.* for a tiny performance boost.
            token_type = token.token_type.value
            if token_type == 0:  # TokenType.TEXT
                self.extend_nodelist(nodelist, TextNode(token.contents), token)
            elif token_type == 1:  # TokenType.VAR
                if not token.contents:
                    raise self.error(
                        token, "Empty variable tag on line %d" % token.lineno
                    )
                try:
                    filter_expression = self.compile_filter(token.contents)
                except TemplateSyntaxError as e:
                    raise self.error(token, e)
                var_node = VariableNode(filter_expression)
                self.extend_nodelist(nodelist, var_node, token)
            elif token_type == 2:  # TokenType.BLOCK
                try:
                    command = token.contents.split()[0]
                except IndexError:
                    raise self.error(token, "Empty block tag on line %d" % token.lineno)
                if command in parse_until:
                    # A matching token has been reached. Return control to
                    # the caller. Put the token back on the token list so the
                    # caller knows where it terminated.
                    self.prepend_token(token)
                    return nodelist
                # Add the token to the command stack. This is used for error
                # messages if further parsing fails due to an unclosed block
                # tag.
                self.command_stack.append((command, token))
                # Get the tag callback function from the ones registered with
                # the parser.
                try:
>                   compile_func = self.tags[command]
E                   KeyError: 'query_string'

/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:510: KeyError

During handling of the above exception, another exception occurred:

self = <accounts.tests.TestSelectedInstance testMethod=test_selected_instance_slash_truncate>

    def test_selected_instance_slash_truncate(self):
>       response = self.client.get("/?selected_instance=https://mastodon.social/")

accounts/tests.py:144: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:1129: in get
    response = super().get(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:479: in get
    return self.generic(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:676: in generic
    return self.request(**r)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:1092: in request
    self.check_exception(response)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/test/client.py:805: in check_exception
    raise exc_value
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/core/handlers/exception.py:55: in inner
    response = get_response(request)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/core/handlers/base.py:197: in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
accounts/views.py:144: in index
    return render(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/shortcuts.py:25: in render
    content = loader.render_to_string(template_name, context, request, using=using)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader.py:61: in render_to_string
    template = get_template(template_name, using=using)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader.py:15: in get_template
    return engine.get_template(template_name)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/backends/django.py:79: in get_template
    return Template(self.engine.get_template(template_name), self)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/engine.py:177: in get_template
    template, origin = self.find_template(template_name)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/engine.py:159: in find_template
    template = loader.get_template(name, skip=skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/template_partials/loader.py:41: in get_template
    template = self.loaders[0].get_template(template_name, skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loaders/cached.py:57: in get_template
    template = super().get_template(template_name, skip)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loaders/base.py:28: in get_template
    return Template(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:154: in __init__
    self.nodelist = self.compile_nodelist()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:196: in compile_nodelist
    nodelist = parser.parse()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader_tags.py:295: in do_extends
    nodelist = parser.parse()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/loader_tags.py:234: in do_block
    nodelist = parser.parse(("endblock",))
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:518: in parse
    raise self.error(token, e)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:516: in parse
    compiled_result = compile_func(self, token)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/defaulttags.py:962: in do_if
    nodelist = parser.parse(("elif", "else", "endif"))
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:512: in parse
    self.invalid_block_tag(token, command, parse_until)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Parser tokens=[<Text token: "...">, <Block token: "endblock sidebar...">, <Text token: "            </ul> ...">, <Blo...xt token: ""                  ...">, <Block token: "static selected_lang...">, <Text token: ""               cla...">]>
token = <Block token: "query_string...">, command = 'query_string'
parse_until = ('elif', 'else', 'endif')

    def invalid_block_tag(self, token, command, parse_until=None):
        if parse_until:
>           raise self.error(
                token,
                "Invalid block tag on line %d: '%s', expected %s. Did you "
                "forget to register or load this tag?"
                % (
                    token.lineno,
                    command,
                    get_text_list(["'%s'" % p for p in parse_until], "or"),
                ),
            )
E           django.template.exceptions.TemplateSyntaxError: Invalid block tag on line 11: 'query_string', expected 'elif', 'else' or 'endif'. Did you forget to register or load this tag?

/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/django/template/base.py:563: TemplateSyntaxError
Run 5 months, 1 week ago
Status PASS
Commit

Merge pull request #63 from anze3db/pre-commit-ci-update-config

Commit f687e pushed by Anže Pečar
Run 5 months, 1 week ago
Status PASS
Commit

Merge f0fdbac1e059e2d1539baf074321341c015c972f into c213d01438830742427d8846f38b88dce99221b7

Commit d30f8 pushed by pre-commit-ci[bot]
Run 5 months, 1 week ago
Status PASS
Commit

Move order by to in confs to match accounts

Commit c213d pushed by Anže Pečar
Run 5 months, 2 weeks ago
Status PASS
Commit

Better error reporting when instance is wrong

Commit bc84b pushed by Anže Pečar
Run 5 months, 2 weeks ago
Status PASS
Commit

Merge pull request #60 from anze3db/pre-commit-ci-update-config

Commit d052a pushed by Anže Pečar
Run 5 months, 2 weeks ago
Status PASS
Commit

Remove post tests

Commit f510c pushed by Anže Pečar
Run 5 months, 2 weeks ago
Status PASS
Commit

Deprecate post urls

Commit f1dc2 pushed by Anže Pečar
Run 5 months, 2 weeks ago
Status PASS
Commit

Merge pull request #59 from anze3db/17-show-daily-stats

Commit 6fd63 pushed by Anže Pečar
Run 5 months, 2 weeks ago
Status PASS
Commit

Merge 372ccc6572cdb72c2065848845be8c021c35c04c into f4fad16e3ec1d040c909862b5c4f50257786950d

Commit b988e pushed by Gašper Martič
Run 5 months, 2 weeks ago
Status PASS
Commit

Merge ab8685b4ed3f61eb3829b36e3b7f88e269b87f50 into f4fad16e3ec1d040c909862b5c4f50257786950d

Commit 0b950 pushed by Gašper Martič
Run 5 months, 2 weeks ago
Status PASS
Commit

Merge 35f7990d53f32e4b0e9af9b75dd1cfae64fb3632 into f4fad16e3ec1d040c909862b5c4f50257786950d

Commit 617d9 pushed by Gašper Martič
Run 5 months, 2 weeks ago
Status PASS
Commit

Merge 6b9ac0627d46e3ba5ebfa0f1daf2388d6a6b52e8 into f4fad16e3ec1d040c909862b5c4f50257786950d

Commit cbb2d pushed by Gašper Martič
Run 5 months, 2 weeks ago
Status PASS
Commit

Merge f4e37fc6059e7c9302ba0237299b639e4a7ebc16 into f4fad16e3ec1d040c909862b5c4f50257786950d

Commit a402d pushed by Gašper Martič
Run 5 months, 2 weeks ago
Status PASS
Commit

Merge 1bb3ac72fd0e605bd1227003c18a5529ffed2def into f4fad16e3ec1d040c909862b5c4f50257786950d

Commit 8875f pushed by Gašper Martič
Run 5 months, 2 weeks ago
Status PASS
Commit

Merge 2987fbf9365fcf9f6ba4442228381cf5ffea302d into f4fad16e3ec1d040c909862b5c4f50257786950d

Commit 07e3f pushed by pre-commit-ci[bot]
Run 5 months, 2 weeks ago
Status PASS
Commit

Merge da49ade03b2c51a798246a81c5b020664a49f6fe into f4fad16e3ec1d040c909862b5c4f50257786950d

Commit 5f469 pushed by Gašper Martič
Run 5 months, 2 weeks ago
Status PASS
Commit

Merge 11257c29973f7466e9f4eb1c74d4742c70b5b416 into f4fad16e3ec1d040c909862b5c4f50257786950d

Commit e1328 pushed by Gašper Martič
Run 5 months, 3 weeks ago
Status PASS
Commit

Merge fb741d9b7bdd28db04bc9598acb9f44238eb1c6a into f4fad16e3ec1d040c909862b5c4f50257786950d

Commit 4c3b7 pushed by Gašper Martič
Run 5 months, 3 weeks ago
Status PASS
Commit

Merge d043d34427eaa62c36f2f8fb65601032210bd554 into f4fad16e3ec1d040c909862b5c4f50257786950d

Commit 02389 pushed by Gašper Martič
Run 5 months, 3 weeks ago
Status PASS
Commit

Merge a53eb11db21adb70d731abcada99a51e9228ba5c into f4fad16e3ec1d040c909862b5c4f50257786950d

Commit 4bf84 pushed by Gašper Martič
Run 5 months, 3 weeks ago
Status PASS
Commit

[pre-commit.ci] pre-commit autoupdate (#58)

Commit f4fad pushed by pre-commit-ci[bot]
Run 5 months, 3 weeks ago
Status PASS
Commit

Merge a1f947199121083463fb7c42c40d7b31ddc87d56 into 662733d6baabdac9ab3adfc9eea39d8b50f4aab5

Commit 0613c pushed by pre-commit-ci[bot]
Run 5 months, 3 weeks ago
Status PASS
Commit

Adjust batch size based on action

Commit 66273 pushed by Anže Pečar
Run 5 months, 3 weeks ago
Status PASS
Commit

Accountstats weeks months (#57)

Commit fe878 pushed by Gašper Martič