Tag: django-tests

Automatisiertes Testen ist ein äußerst nützliches Tool zum Entfernen von Fehlern für den modernen Webentwickler.

Wie führen Sie alle tests mit python manage.py test-Befehl in django

Anzahl der Antworten 1 Antworten
Arbeite ich an einem django-Projekt, in dem ich mehrere apps. Jede app hat tests-Verzeichnis die test für das gesamte Projekt. Meine Verzeichnisstruktur ist wie folgt. Project App_1 tests __init__.py tests_views.py App_2 tests __init__.py tests_views.py settings.py manage.py Ich

Was ist eigentlich assertEquals in Python?

Anzahl der Antworten 5 Antworten
Habe ich Folgendes test.py Datei in django. kann Sie erklären Sie bitte diesen code? from contacts.models import Contact ... class ContactTests(TestCase): """Contact model tests.""" def test_str(self): contact = Contact(first_name='John', last_name='Smith') self.assertEquals( str(contact), 'John Smith', ) Es wird