title: self.assertEqual(response.status_code, status.HTTP_200_OK) AssertionError: 404 != 200
body: <hr />
  <p>This is were the error comes from</p>
  <pre><code>def test_single_status_retrieve(self):
              serializer_data = ProfileStatusSerializer(instance=self.status).data
              response = self.client.get(reverse(&quot;status-detail&quot;, kwargs={&quot;pk&quot;: 1}))
              self.assertEqual(response.status_code, status.HTTP_200_OK)
              response_data = json.loads(response.content)
              self.assertEqual(serializer_data, response_data)
  </code></pre>
  <p>It seems like the error is coming from somewhere else.</p>
  <p>Here is my setUp</p>
  <pre><code>def setUp(self):
          self.user = User.objects.create_user(username=&quot;test2&quot;,
                                              password=&quot;change123&quot;,
                                              )
          self.status = ProfileStatus.objects.create(user_profile=self.user.profile, 
                                                      status_content=&quot;status test&quot;)                             
          self.token = Token.objects.create(user=self.user)
          self.api_authentication()
  </code></pre>
  <p>here is <strong>urls.py</strong> file</p>
  <pre><code>from django.db import router
  from django.urls import include, path
  from rest_framework.routers import DefaultRouter
  from profiles.api.views import (AvatarUpdateView,
                                  ProfileViewSet, 
                                  ProfileStatusViewSet,
                                  )
  
  router = DefaultRouter()
  router.register(r&quot;profiles&quot;, ProfileViewSet)
  router.register(r&quot;status&quot;, ProfileStatusViewSet, basename=&quot;status&quot;)
  
  urlpatterns = [
      path(&quot;&quot;, include(router.urls)),
      path(&quot;avatar/&quot;, AvatarUpdateView.as_view(), name=&quot;avatar-update&quot;),
  ]
  </code></pre>
  <p><strong>This is what I got when I ran the test</strong></p>
  <blockquote>
  <p>(ProjectName) bash-3.2$ <strong>python3 manage.py test</strong> Creating test database for alias 'default'... System check identified no issues (0
  silenced). F.........
  ================================================================= FAIL: test_single_status_retrieve
  (profiles.tests.ProfileStatusViewSetTestCase)
  ---------------------------------------------------------------------- Traceback (most recent call last):   File
  &quot;path.../ProjectName/src/profiles/tests.py&quot;, line 101, in
  test_single_status_retrieve
  self.assertEqual(response.status_code, status.HTTP_200_OK) AssertionError: 404 != 200</p>
  <p>---------------------------------------------------------------------- Ran 10 tests in 1.362s</p>
  <p>FAILED (failures=1) Destroying test database for alias 'default'...</p>
  </blockquote>