~leonardr/launchpadlib/correct-test-failure

« back to all changes in this revision

Viewing changes to src/launchpadlib/tests/test_launchpad.py

  • Committer: Leonard Richardson
  • Date: 2010-08-23 20:05:41 UTC
  • mfrom: (95.1.1 new-ad-hoc-testing)
  • Revision ID: leonard.richardson@canonical.com-20100823200541-3jw2mlmfgd4fk2zf
Tags: 1.6.5
[r=abentley] Make compatible with the latest lazr.restfulclient.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
import tempfile
25
25
import unittest
26
26
 
 
27
from lazr.restfulclient.resource import ServiceRoot
 
28
 
27
29
from launchpadlib.credentials import (
28
30
    AccessToken, AuthorizeRequestTokenWithBrowser, Credentials)
29
31
from launchpadlib.launchpad import Launchpad
58
60
        return launchpad
59
61
 
60
62
 
 
63
class TestResourceTypeClasses(unittest.TestCase):
 
64
    """launchpadlib must know about restfulclient's resource types."""
 
65
 
 
66
    def test_resource_types(self):
 
67
        # Make sure that Launchpad knows about every special resource
 
68
        # class defined by lazr.restfulclient.
 
69
        for name, cls in ServiceRoot.RESOURCE_TYPE_CLASSES.items():
 
70
            self.assertEqual(Launchpad.RESOURCE_TYPE_CLASSES[name], cls)
 
71
 
 
72
 
61
73
class TestNameLookups(unittest.TestCase):
62
74
    """Test the utility functions in the 'uris' module."""
63
75