Skip to content

Commit

Permalink
reverted debugs
Browse files Browse the repository at this point in the history
  • Loading branch information
wrabit committed Jul 6, 2024
1 parent c149695 commit d0b9f0d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion django_cotton/tests/inline_test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def tearDownClass(cls):
super().tearDownClass()

def tearDown(self):
"""Clear cache between tests"""
"""Clear cache between tests so that we can use the same file names for simplicity"""
cache.clear()

def create_template(self, name, content):
Expand Down
21 changes: 14 additions & 7 deletions django_cotton/tests/test_cotton.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def test_component_is_rendered(self):
# Override URLconf
with self.settings(ROOT_URLCONF=self.get_url_conf()):
response = self.client.get("/view/")
print(response.content.decode())
self.assertContains(response, '<div class="i-am-component">')
self.assertContains(response, "Hello, World!")

Expand All @@ -35,10 +34,13 @@ def test_new_lines_in_attributes_are_preserved(self):
self.create_template(
"view.html",
"""
<c-component x-data="{
test
test
}" />
<c-component x-data="{
attr1: 'im an attr',
var1: 'im a var',
method() {
return 'im a method';
}
}" />
""",
)

Expand All @@ -50,8 +52,13 @@ def test_new_lines_in_attributes_are_preserved(self):
response = self.client.get("/view/")

self.assertTrue(
"""test
test"""
"""{
attr1: 'im an attr',
var1: 'im a var',
method() {
return 'im a method';
}
}"""
in response.content.decode()
)

Expand Down

0 comments on commit d0b9f0d

Please sign in to comment.