summaryrefslogtreecommitdiff
path: root/test/test_all.py
diff options
context:
space:
mode:
authornitromaster101 <nitromaster101@5914aa95-5b3a-0410-a3b5-7b719e7fe9b2>2009-06-18 00:40:17 +0000
committernitromaster101 <nitromaster101@5914aa95-5b3a-0410-a3b5-7b719e7fe9b2>2009-06-18 00:40:17 +0000
commit0c9fbd67b05112e43fe86bd634b155bd07a8f9b2 (patch)
treeb23dc25c8e6f9c46b96965233f94a5270aa7ed37 /test/test_all.py
parenta204245ad0186b565c527a764efa682de9a0c7fc (diff)
added uri upload
git-svn-id: http://freebase-python.googlecode.com/svn/trunk@96 5914aa95-5b3a-0410-a3b5-7b719e7fe9b2
Diffstat (limited to 'test/test_all.py')
-rwxr-xr-xtest/test_all.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/test_all.py b/test/test_all.py
index cf52eef..b07cb35 100755
--- a/test/test_all.py
+++ b/test/test_all.py
@@ -203,7 +203,8 @@ class TestFreebase(unittest.TestCase):
self.assertNotEqual(len(r1), len(r2))
def test_touch(self):
- pass
+ # this one's hard to test... let's just make sure it works.
+ freebase.touch()
def test_geosearch(self):
@@ -213,8 +214,20 @@ class TestFreebase(unittest.TestCase):
r0 = freebase.geosearch(location="/en/california")
self.assertNotEqual(len(r0), 0)
+ json = freebase.geosearch(location="/en/san_francisco", format="json")
+ kml = freebase.geosearch(location="/en/san_francisco", format="kml")
+ self.assertNotEqual(json, kml)
+ def test_uri_submit(self):
+ # test a pdf
+ r = freebase.sandbox.uri_submit("http://www.jcbl.or.jp/game/nec/necfest07/nec2007_data/HayashiMiyake.pdf", content_type="application/pdf")
+ self.assertEqual(r['/type/content/media_type'], 'application/pdf')
+
+ # test an image
+ r = freebase.sandbox.uri_submit("http://datamob.org/media/detail_freebase.png")
+ self.assertEqual(r['/type/content/media_type'], 'image/png')
+
if __name__ == '__main__':