title: AssertionError: No templates used to render the response
body: <p>I solved the problem while writing this question but I wanted to post it so maybe someone needs this answer</p>
  <hr>
  <p>Hello my friends.
  i am new to django testing.
  while i'm testing my views i faced this error in some views.</p>
  <p><strong>This is my views.py:</strong></p>
  <pre><code>def all_programs(request):
      programs = Program.objects.all()
      return render(request, 'orders/all_programs.html', {'programs': programs})
  
  
  def checkout(request, slug):
      if request.method == 'POST':
          # get data from form and save it
  
      program = get_object_or_404(Program, slug=slug)
      dates = ProgramDate.objects.filter(program=program)
      return render(request, 'orders/checkout.html', {'program': program, 'dates': dates})
  </code></pre>
  <p><strong>This is urls.py:</strong></p>
  <pre class="lang-py prettyprint-override"><code>from django.urls import path
  from django.views.generic import RedirectView
  from .views import *
  
  app_name = 'orders'
  
  urlpatterns = [
      path('', RedirectView.as_view(url='https://www.another-website.net')),
      path('tests/', all_programs, name='all_programs'),
      path('checkout/&lt;str:slug&gt;/', checkout, name='checkout'),
      path('checkout/return_page/', ReturnPage.as_view(), name='return_page'),
  ]
  
  </code></pre>
  <p><strong>And this is test_views.py:</strong></p>
  <pre class="lang-py prettyprint-override"><code>from django.test import TestCase
  from django.shortcuts import reverse
  
  
  class TestViews(TestCase):
      
      def test_all_programs(self):
          response = self.client.get(reverse('orders:all_programs'))
          self.assertTemplateUsed(response, 'orders/all_programs.html')
  
      def test_checkout(self):    # error id here
          response = self.client.get(reverse('orders:all_programs', kwargs={'slug': 'test'}))     # I tried this  
          # response = self.client.get('http://127.0.0.1:8000/checkout/test/')    #and this
          self.assertTemplateUsed(response, 'orders/checkout.html')
  
  </code></pre>