mirror of
https://github.com/django-components/django-components.git
synced 2025-07-08 18:05:00 +00:00

* feat: add decorator for writing component tests * refactor: udpate changelog + update deps pins * refactor: fix deps * refactor: make cached_ref into generic and fix linter errors * refactor: fix coverage testing * refactor: use global var instead of env var for is_testing state
14 lines
696 B
Python
14 lines
696 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
|