from django.test import TestCase
# Create your tests here.
class TestView(TestCase):
def test_two_is_three(self):
self.assertEqual(2,3)
def test_two_is_two(self):
self.assertEqual(2,2)
결과
(venv) ksw4060@gimseong-uui-MacBookPro DRF_Project002 % python3 [manage.py](<http://manage.py/>) test
Found 2 test(s).
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
F.
### FAIL: test_two_is_three (article.tests.TestView.test_two_is_three)
Traceback (most recent call last):
File "/Users/ksw4060/Desktop/Coding/django/DRF_Project002/article/tests.py", line 6, in test_two_is_three
self.assertEqual(2,3)
AssertionError: 2 != 3
---
Ran 2 tests in 0.000s
FAILED (failures=1)
Destroying test database for alias 'default'...