Beispiel #1
0
    def test_invalid_type(self):

        # Check if a string is passed in
        with self.assertRaises(InvalidResourcePath):
            format_path(5)

        with self.assertRaises(InvalidResourcePath):
            format_path("https://www.eventbrite.com")

        with self.assertRaises(InvalidResourcePath):
            format_path("http://www.eventbriteapi.com/v3/users/me/")

        with self.assertRaises(InvalidResourcePath):
            format_path("users/me/")
Beispiel #2
0
 def test_formatted_path(self):
     path = format_path('/users/me')
     self.assertEqual(path, EVENTBRITE_API_URL + 'users/me')