class ListResourceTest(unittest.TestCase):

    def setUp(self):
        self.r = ListResource(base_uri, auth)

    def testListResourceInit(self):
        uri = "{}/{}".format(base_uri, self.r.name)
        self.assertEquals(self.r.uri, uri)

    def testKeyValue(self):
        self.assertEquals(self.r.key, self.r.name.lower())

    def testKeyValue(self):
        self.r.key = "Hey"
        self.assertEquals(self.r.key, "Hey")

    def testInstanceLoading(self):
        instance = self.r.load_instance({"sid": "foo"})

        self.assertIsInstance(instance, InstanceResource)
        self.assertEquals(instance.sid, "foo")
 def setUp(self):
     self.r = ListResource(base_uri, auth)
def test_equivalence():
    p = ListResource(base_uri, auth)
    r1 = p.load_instance({"sid": "AC123"})
    r2 = p.load_instance({"sid": "AC123"})
    assert_equals(r1, r2)