summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtest/test_all.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/test_all.py b/test/test_all.py
index b3802f6..cfe83f8 100755
--- a/test/test_all.py
+++ b/test/test_all.py
@@ -169,6 +169,23 @@ class TestFreebase(unittest.TestCase):
r = freebase.mqlread({"id":kurt, "/common/topic/article":[{"id":None, "optional":True, "limit":1}]})
raw = freebase.raw(r["/common/topic/article"][0].id)
self.assertNotEqual(len(raw), 0)
+
+ # trans should also work
+ trans = freebase.trans(r["/common/topic/article"][0].id)
+ self.assertEqual(trans, raw)
+
+ def test_unsafe(self):
+ kurt = "/en/kurt_vonnegut"
+
+ self.assertRaises(MetawebError, lambda: freebase.unsafe(kurt))
+
+ r = freebase.mqlread({"id":kurt, "/common/topic/article":[{"id":None, "optional":True, "limit":1}]})
+ unsafe = freebase.unsafe(r["/common/topic/article"][0].id)
+ self.assertNotEqual(len(unsafe), 0)
+
+ # we need an example of getting unsafe data
+ # ...
+
def test_trans_image_thumb(self):
kurt = "/en/kurt_vonnegut"