def test_guestbookmodel_fetchlist(): results = guestbookmodel.fetchlist() print(results)
def index(request): # return HttpResponse('<h1>Hello World</h1>', content_type='text/html') results = guestbookmodel.fetchlist() data = {'guestbooklist': results} return render(request, 'guestbook/index.html', data)
def test_guestbookModel_fetchall(): results = guestbook_models.fetchlist() print(results)
def index(request): results = mysitemodel.fetchlist() data = {'mysitelist': results } return render(request, 'guestbook/index.html', data)
from django.test import TestCase # Create your tests here. from guestbook.models import fetchlist print(fetchlist())