-def test_get_trends():
- # This is one method of inserting parameters, using named
- # underscore params.
- world_trends = twitter.trends._woeid(_woeid=1)
- assert world_trends
+def test_get_trends_3():
+ # Of course they broke it all again in 1.1...
+ assert twitter11.trends.place(_id=1)
+
+
+def test_TwitterHTTPError_raised_for_invalid_oauth():
+ test_passed = False
+ try:
+ twitter11_na.statuses.mentions_timeline()
+ except TwitterHTTPError:
+ # this is the error we are looking for :)
+ test_passed = True
+ assert test_passed
+
+
+def test_picklability():
+ res = TwitterDictResponse({'a': 'b'})
+ p = pickle.dumps(res)
+ res2 = pickle.loads(p)
+ assert res == res2
+ assert res2['a'] == 'b'
+
+ res = TwitterListResponse([1, 2, 3])
+ p = pickle.dumps(res)
+ res2 = pickle.loads(p)
+ assert res == res2
+ assert res2[2] == 3
+