Spaces:
Sleeping
Sleeping
Download src/lists/tests.py from VelogaWhite/Django_Cal_Javascript: direct link, hf CLI and curl.
- Browser
- Download file 621 Bytes
-
https://huggingface.co/spaces/VelogaWhite/Django_Cal_Javascript/resolve/main/src/lists/tests.py
- Command line
-
hf download hf://spaces/VelogaWhite/Django_Cal_Javascript/src/lists/tests.py
-
curl -L -o tests.py https://huggingface.co/spaces/VelogaWhite/Django_Cal_Javascript/resolve/main/src/lists/tests.py
621 Bytes
| from django.test import TestCase | |
| class HomePageTest(TestCase): | |
| def test_uses_home_template(self): | |
| response = self.client.get("/") | |
| self.assertTemplateUsed(response, "home.html") | |
| def test_displays_calculator_widget(self): | |
| response = self.client.get("/") | |
| html = response.content.decode('utf8') | |
| # Check for the two input boxes | |
| self.assertIn('id="id_number_1"', html) | |
| self.assertIn('id="id_number_2"', html) | |
| # Check for the two buttons | |
| self.assertIn('id="id_btn_sum"', html) | |
| self.assertIn('id="id_btn_subtract"', html) |