django-components/tests/test_utils.py
Juro Oravec f100cc1836
Some checks are pending
Docs - build & deploy / docs (push) Waiting to run
Run tests / build (ubuntu-latest, 3.10) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.11) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.12) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.13) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.8) (push) Waiting to run
Run tests / test_sampleproject (3.13) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.9) (push) Waiting to run
Run tests / build (windows-latest, 3.10) (push) Waiting to run
Run tests / build (windows-latest, 3.11) (push) Waiting to run
Run tests / build (windows-latest, 3.12) (push) Waiting to run
Run tests / build (windows-latest, 3.13) (push) Waiting to run
Run tests / build (windows-latest, 3.8) (push) Waiting to run
Run tests / build (windows-latest, 3.9) (push) Waiting to run
Run tests / test_docs (3.13) (push) Waiting to run
refactor: replace isort, black and flake8 with ruff (#1346)
2025-09-10 14:06:53 +02:00

15 lines
697 B
Python

from django_components.util.misc import is_str_wrapped_in_quotes
class TestUtils:
def test_is_str_wrapped_in_quotes(self):
assert is_str_wrapped_in_quotes("word") is False
assert is_str_wrapped_in_quotes('word"') is False
assert is_str_wrapped_in_quotes('"word') is False
assert is_str_wrapped_in_quotes('"word"') is True
assert is_str_wrapped_in_quotes("\"word'") is False
assert is_str_wrapped_in_quotes('"word" ') is False
assert is_str_wrapped_in_quotes('"') is False
assert is_str_wrapped_in_quotes("") is False
assert is_str_wrapped_in_quotes('""') is True
assert is_str_wrapped_in_quotes("\"'") is False