from django.test import SimpleTestCase
from django.urls import reverse, resolve
from snippets.views import snip_listing, snip_detail, add_new


class TestUrls(SimpleTestCase):
    def test_list_url_is_resolved(self):
        url = reverse("snippets:list")
        print(resolve(url))
        self.assertEquals(resolve(url).func, snip_listing)

    def test_detail_url_is_resolved(self):
        url = reverse("snippets:detail", args=[1])
        print(resolve(url))
        self.assertEquals(resolve(url).func, snip_detail)

    def test_addnew_url_is_resolved(self):
        url = reverse("snippets:addnew")
        print(resolve(url))
        self.assertEquals(resolve(url).func, add_new)

37c46ef267d0f7bb2253c2a86a5e9a1805acc3e6
<mask token>


class TestUrls(SimpleTestCase):
    <mask token>
    <mask token>

    def test_addnew_url_is_resolved(self):
        url = reverse('snippets:addnew')
        print(resolve(url))
        self.assertEquals(resolve(url).func, add_new)

<mask token>


class TestUrls(SimpleTestCase):

    def test_list_url_is_resolved(self):
        url = reverse('snippets:list')
        print(resolve(url))
        self.assertEquals(resolve(url).func, snip_listing)
    <mask token>

    def test_addnew_url_is_resolved(self):
        url = reverse('snippets:addnew')
        print(resolve(url))
        self.assertEquals(resolve(url).func, add_new)

<mask token>


class TestUrls(SimpleTestCase):

    def test_list_url_is_resolved(self):
        url = reverse('snippets:list')
        print(resolve(url))
        self.assertEquals(resolve(url).func, snip_listing)

    def test_detail_url_is_resolved(self):
        url = reverse('snippets:detail', args=[1])
        print(resolve(url))
        self.assertEquals(resolve(url).func, snip_detail)

    def test_addnew_url_is_resolved(self):
        url = reverse('snippets:addnew')
        print(resolve(url))
        self.assertEquals(resolve(url).func, add_new)

from django.test import SimpleTestCase
from django.urls import reverse, resolve
from snippets.views import snip_listing, snip_detail, add_new


class TestUrls(SimpleTestCase):

    def test_list_url_is_resolved(self):
        url = reverse('snippets:list')
        print(resolve(url))
        self.assertEquals(resolve(url).func, snip_listing)

    def test_detail_url_is_resolved(self):
        url = reverse('snippets:detail', args=[1])
        print(resolve(url))
        self.assertEquals(resolve(url).func, snip_detail)

    def test_addnew_url_is_resolved(self):
        url = reverse('snippets:addnew')
        print(resolve(url))
        self.assertEquals(resolve(url).func, add_new)

from django.test import SimpleTestCase
from django.urls import reverse, resolve
from snippets.views import snip_listing, snip_detail, add_new


class TestUrls(SimpleTestCase):
    def test_list_url_is_resolved(self):
        url = reverse("snippets:list")
        print(resolve(url))
        self.assertEquals(resolve(url).func, snip_listing)

    def test_detail_url_is_resolved(self):
        url = reverse("snippets:detail", args=[1])
        print(resolve(url))
        self.assertEquals(resolve(url).func, snip_detail)

    def test_addnew_url_is_resolved(self):
        url = reverse("snippets:addnew")
        print(resolve(url))
        self.assertEquals(resolve(url).func, add_new)
