[libgdata] tests: Disable some invalid comparisons in the PicasaWeb tests
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] tests: Disable some invalid comparisons in the PicasaWeb tests
- Date: Fri, 2 Aug 2013 10:10:55 +0000 (UTC)
commit 9ebcbcd52ad02cf7de17d263c2d345d9431a41a5
Author: Philip Withnall <philip tecnocode co uk>
Date: Thu Aug 1 17:58:16 2013 +0200
tests: Disable some invalid comparisons in the PicasaWeb tests
Turns out that Google servers can arbitrarily change a few more values
than I thought, which the tests didn’t expect to change.
gdata/tests/picasaweb.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/gdata/tests/picasaweb.c b/gdata/tests/picasaweb.c
index c72b04f..708e48d 100644
--- a/gdata/tests/picasaweb.c
+++ b/gdata/tests/picasaweb.c
@@ -181,7 +181,8 @@ assert_files_equal (GDataPicasaWebFile *file1, GDataPicasaWebFile *file2, gboole
g_assert_cmpstr (gdata_entry_get_summary (GDATA_ENTRY (file1)), ==, gdata_entry_get_summary
(GDATA_ENTRY (file2)));
g_assert_cmpstr (gdata_entry_get_content (GDATA_ENTRY (file1)), ==, gdata_entry_get_content
(GDATA_ENTRY (file2)));
g_assert_cmpstr (gdata_entry_get_content (GDATA_ENTRY (file1)), ==, NULL);
- g_assert_cmpstr (gdata_entry_get_content_uri (GDATA_ENTRY (file1)), ==, gdata_entry_get_content_uri
(GDATA_ENTRY (file2)));
+ /* Apparently Google will arbitrarily change content URIs for things at various times. */
+ /*g_assert_cmpstr (gdata_entry_get_content_uri (GDATA_ENTRY (file1)), ==, gdata_entry_get_content_uri
(GDATA_ENTRY (file2)));*/
g_assert (strstr (gdata_entry_get_content_uri (GDATA_ENTRY (file1)), "googleusercontent.com") !=
NULL);
g_assert_cmpstr (gdata_entry_get_rights (GDATA_ENTRY (file1)), ==, gdata_entry_get_rights
(GDATA_ENTRY (file2)));
@@ -233,7 +234,8 @@ assert_files_equal (GDataPicasaWebFile *file1, GDataPicasaWebFile *file2, gboole
/* Same as above; don't compare the edited times. */
g_assert_cmpint (gdata_picasaweb_file_get_edited (file1), >, 0);
g_assert_cmpint (gdata_picasaweb_file_get_edited (file2), >, 0);
- g_assert_cmpstr (gdata_picasaweb_file_get_version (file1), ==,
gdata_picasaweb_file_get_version (file2));
+ /* See ETags and content URIs above. */
+ /*g_assert_cmpstr (gdata_picasaweb_file_get_version (file1), ==,
gdata_picasaweb_file_get_version (file2));*/
g_assert_cmpuint (strlen (gdata_picasaweb_file_get_version (file1)), >, 0);
g_assert_cmpstr (gdata_picasaweb_file_get_album_id (file1), ==,
gdata_picasaweb_file_get_album_id (file2));
g_assert_cmpuint (strlen (gdata_picasaweb_file_get_album_id (file1)), >, 0);
@@ -262,7 +264,8 @@ assert_files_equal (GDataPicasaWebFile *file1, GDataPicasaWebFile *file2, gboole
content1 = GDATA_MEDIA_CONTENT (i1->data);
content2 = GDATA_MEDIA_CONTENT (i2->data);
- g_assert_cmpstr (gdata_media_content_get_uri (content1), ==,
gdata_media_content_get_uri (content2));
+ /* And here: Google can arbitrarily change content URIs. */
+ /*g_assert_cmpstr (gdata_media_content_get_uri (content1), ==,
gdata_media_content_get_uri (content2));*/
g_assert (strstr (gdata_media_content_get_uri (content1), "googleusercontent.com") !=
NULL);
g_assert_cmpstr (gdata_media_content_get_content_type (content1), ==,
gdata_media_content_get_content_type (content2));
g_assert_cmpstr (gdata_media_content_get_content_type (content1), ==, "image/jpeg");
@@ -300,7 +303,8 @@ assert_files_equal (GDataPicasaWebFile *file1, GDataPicasaWebFile *file2, gboole
thumbnail1 = GDATA_MEDIA_THUMBNAIL (i1->data);
thumbnail2 = GDATA_MEDIA_THUMBNAIL (i2->data);
- g_assert_cmpstr (gdata_media_thumbnail_get_uri (thumbnail1), ==,
gdata_media_thumbnail_get_uri (thumbnail2));
+ /* And here: Google can arbitrarily change thumbnail URIs. */
+ /*g_assert_cmpstr (gdata_media_thumbnail_get_uri (thumbnail1), ==,
gdata_media_thumbnail_get_uri (thumbnail2));*/
g_assert (strstr (gdata_media_thumbnail_get_uri (thumbnail1),
"googleusercontent.com") != NULL);
g_assert_cmpint (gdata_media_thumbnail_get_time (thumbnail1), ==,
gdata_media_thumbnail_get_time (thumbnail2));
g_assert_cmpint (gdata_media_thumbnail_get_time (thumbnail1), ==, -1); /* PicasaWeb
doesn't set anything better */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]