Created
January 2, 2013 16:21
-
-
Save bohde/4435779 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.test import TestCase | |
from models import App | |
from my_api import api | |
class ResourceUriTestCase(TestCase): | |
urls = 'path.to.api.urls' | |
def test_uri_uses_the_uuid(self): | |
uuid = new_uuid() | |
model = App(id=uuid) | |
resource = api.canonical_resource_for('app') | |
uri = resource.get_resource_uri(model) | |
self.assertEqual(uri, '/api/v1/app/%s/' % uuid) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment