conduit r1640 - in trunk: . conduit/modules/GoogleModule test/python-tests
- From: jstowers svn gnome org
- To: svn-commits-list gnome org
- Subject: conduit r1640 - in trunk: . conduit/modules/GoogleModule test/python-tests
- Date: Sun, 3 Aug 2008 10:48:59 +0000 (UTC)
Author: jstowers
Date: Sun Aug 3 10:48:59 2008
New Revision: 1640
URL: http://svn.gnome.org/viewvc/conduit?rev=1640&view=rev
Log:
* conduit/modules/GoogleModule/GoogleModule.py:
* test/python-tests/TestDataProviderGoogleCalendar.py:
* test/python-tests/TestDataProviderYoutube.py: Move
GoogleCalendar tests to their own file. Disable google
calendar because its broken.
Added:
trunk/test/python-tests/TestDataProviderGoogleCalendar.py
- copied, changed from r1639, /trunk/test/python-tests/TestDataProviderGoogle.py
trunk/test/python-tests/TestDataProviderYoutube.py
Removed:
trunk/test/python-tests/TestDataProviderGoogle.py
Modified:
trunk/ (props changed)
trunk/ChangeLog
trunk/conduit/modules/GoogleModule/GoogleModule.py
Modified: trunk/conduit/modules/GoogleModule/GoogleModule.py
==============================================================================
--- trunk/conduit/modules/GoogleModule/GoogleModule.py (original)
+++ trunk/conduit/modules/GoogleModule/GoogleModule.py Sun Aug 3 10:48:59 2008
@@ -36,7 +36,7 @@
import gdata.youtube.service
MODULES = {
- "GoogleCalendarTwoWay" : { "type": "dataprovider" },
+# "GoogleCalendarTwoWay" : { "type": "dataprovider" },
"PicasaTwoWay" : { "type": "dataprovider" },
"YouTubeTwoWay" : { "type": "dataprovider" },
"ContactsTwoWay" : { "type": "dataprovider" },
Copied: trunk/test/python-tests/TestDataProviderGoogleCalendar.py (from r1639, /trunk/test/python-tests/TestDataProviderGoogle.py)
==============================================================================
--- /trunk/test/python-tests/TestDataProviderGoogle.py (original)
+++ trunk/test/python-tests/TestDataProviderGoogleCalendar.py Sun Aug 3 10:48:59 2008
@@ -40,7 +40,6 @@
hour=random.randint(12,23)
ics="""BEGIN:VCALENDAR
VERSION:2.0
-PRODID:-//PYVOBJECT//NONSGML Version 1//EN
BEGIN:VEVENT
DTSTART:2008%(month)02d%(day)02dT%(hour)02d0000Z
DTEND:2008%(month)02d%(day)02dT%(end)02d0000Z
@@ -56,30 +55,9 @@
test.do_dataprovider_tests(
supportsGet=True,
supportsDelete=False,
- safeLUID=SAFE_EVENT_UID,
+ safeLUID=None,
data=event,
name="event"
)
-
-#-------------------------------------------------------------------------------
-# Youtube
-#-------------------------------------------------------------------------------
-#Now a very simple youtube test...
-test = SimpleTest(sourceName="YouTubeSource")
-config = {
- "max_downloads" : MAX_YOUTUBE_VIDEOS
-}
-test.configure(source=config)
-youtube = test.get_source().module
-
-try:
- youtube.refresh()
- ok("Refresh youtube", True)
-except Exception, err:
- ok("Refresh youtube (%s)" % err, False)
-
-videos = youtube.get_all()
-num = len(videos)
-ok("Got %s videos" % num, num == MAX_YOUTUBE_VIDEOS)
-
finished()
+
Added: trunk/test/python-tests/TestDataProviderYoutube.py
==============================================================================
--- (empty file)
+++ trunk/test/python-tests/TestDataProviderYoutube.py Sun Aug 3 10:48:59 2008
@@ -0,0 +1,37 @@
+#common sets up the conduit environment
+from common import *
+
+import conduit.datatypes.Event as Event
+import conduit.utils as Utils
+
+import random
+
+SAFE_CALENDAR_NAME="Conduit Project"
+SAFE_EVENT_UID="2bh7mbagsc880g64qaps06tbp4 google com"
+MAX_YOUTUBE_VIDEOS=5
+
+if not is_online():
+ skip()
+
+#-------------------------------------------------------------------------------
+# Youtube
+#-------------------------------------------------------------------------------
+#Now a very simple youtube test...
+test = SimpleTest(sourceName="YouTubeSource")
+config = {
+ "max_downloads" : MAX_YOUTUBE_VIDEOS
+}
+test.configure(source=config)
+youtube = test.get_source().module
+
+try:
+ youtube.refresh()
+ ok("Refresh youtube", True)
+except Exception, err:
+ ok("Refresh youtube (%s)" % err, False)
+
+videos = youtube.get_all()
+num = len(videos)
+ok("Got %s videos" % num, num == MAX_YOUTUBE_VIDEOS)
+
+finished()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]