Exemple #1
0
    def test_data_detail_view(self):
        """ Just to make certain we have the tests wired up right"""
        # Get the URL
        # Create a request
        request = self.factory.get('/fake-url')
        # Generate a response
        response = DataDetailView.as_view()(request, pk=self.data.pk)

        # Check to see if we had a 404 or not
        self.response_200(response)
Exemple #2
0
    def test_data_detail_view(self):
        """ Just to make certain we have the tests wired up right"""
        # Get the URL
        # Create a request
        request = self.factory.get('/fake-url')
        # Generate a response
        response = DataDetailView.as_view()(request, pk=self.data.pk)

        # Check to see if we had a 404 or not
        self.response_200(response)
Exemple #3
0
from django.conf.urls import url, include

from test_app.views import DataDetailView

urlpatterns = [
    url(r'^spam/', include('spam.urls', namespace='spam')),
    url(
        regex="^(?P<pk>\d+)/$",
        view=DataDetailView.as_view(),
        name="data",
    ),

]