[tracker/tracker-0.10: 17/68] functional tests: New test to ensure correct iptcdata records are read
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.10: 17/68] functional tests: New test to ensure correct iptcdata records are read
- Date: Thu, 28 Apr 2011 12:51:25 +0000 (UTC)
commit 0a73a6bc026ee79d566f372532df8476c0d88576
Author: Aleksander Morgado <aleksander lanedo com>
Date: Mon Apr 11 19:44:51 2011 +0200
functional tests: New test to ensure correct iptcdata records are read
Testing fix in NB#244267
tests/functional-tests/400-extractor.py | 21 ++++++-----
.../test-extraction-data/images/Makefile.am | 36 ++++++++++---------
.../images/test-iptcdata-records.expected | 8 ++++
.../images/test-iptcdata-records.jpg | Bin 0 -> 3608 bytes
4 files changed, 38 insertions(+), 27 deletions(-)
---
diff --git a/tests/functional-tests/400-extractor.py b/tests/functional-tests/400-extractor.py
index 5ac7655..d8e3eae 100755
--- a/tests/functional-tests/400-extractor.py
+++ b/tests/functional-tests/400-extractor.py
@@ -192,17 +192,18 @@ class ExtractionTestCase (ut.TestCase):
self.file_to_extract,
self.rel_description,
section))
- if (value == "@URNUUID@"):
- self.assertIsURN (result [prop][0], error_extra_prop % (prop,
- self.file_to_extract,
- self.rel_description,
- section))
else:
- self.assertNotIn (value, result [prop], error_extra_prop_v % (prop,
- value,
- self.file_to_extract,
- self.rel_description,
- section))
+ if (value == "@URNUUID@"):
+ self.assertIsURN (result [prop][0], error_extra_prop % (prop,
+ self.file_to_extract,
+ self.rel_description,
+ section))
+ else:
+ self.assertNotIn (value, result [prop], error_extra_prop_v % (prop,
+ value,
+ self.file_to_extract,
+ self.rel_description,
+ section))
for prop in expected_keys:
self.assertDictHasKey (result, prop,
diff --git a/tests/functional-tests/test-extraction-data/images/Makefile.am b/tests/functional-tests/test-extraction-data/images/Makefile.am
index bd8bbb7..335029b 100644
--- a/tests/functional-tests/test-extraction-data/images/Makefile.am
+++ b/tests/functional-tests/test-extraction-data/images/Makefile.am
@@ -2,25 +2,27 @@ include $(top_srcdir)/Makefile.decl
imagedir = $(datadir)/tracker-tests/test-extraction-data/images
-image_DATA = \
- test-image-2.png \
+image_DATA = \
+ test-image-2.png \
test-image-2.expected
-gifs = \
- xmp-loaded-1.gif \
- xmp-loaded-1.expected \
- comment-extension-block.expected \
- comment-extension-block.gif \
- corrupted-image.gif \
+gifs = \
+ xmp-loaded-1.gif \
+ xmp-loaded-1.expected \
+ comment-extension-block.expected \
+ comment-extension-block.gif \
+ corrupted-image.gif \
corrupted-image.expected
-tiffs = \
- test-image-3.tif \
+tiffs = \
+ test-image-3.tif \
test-image-3.expected
-jpegs = \
- test-image-1.jpg \
- test-image-1.expected
+jpegs = \
+ test-image-1.jpg \
+ test-image-1.expected \
+ test-iptcdata-records.jpg \
+ test-iptcdata-records.expected
if HAVE_LIBGIF
image_DATA += $(gifs)
@@ -34,8 +36,8 @@ if HAVE_LIBJPEG
image_DATA += $(jpegs)
endif
-EXTRA_DIST = \
- $(image_DATA) \
- $(gifs) \
- $(tiffs \
+EXTRA_DIST = \
+ $(image_DATA) \
+ $(gifs) \
+ $(tiffs \
$(jpegs)
diff --git a/tests/functional-tests/test-extraction-data/images/test-iptcdata-records.expected b/tests/functional-tests/test-extraction-data/images/test-iptcdata-records.expected
new file mode 100644
index 0000000..e0ac05b
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/images/test-iptcdata-records.expected
@@ -0,0 +1,8 @@
+[TestFile]
+Filename=test-iptcdata-records.jpg
+Bugzilla=NB#244267
+Comment=Location information shouldn't be retrieved from the image
+
+[Metadata]
+a=nmm:Photo
+!slo_location=
diff --git a/tests/functional-tests/test-extraction-data/images/test-iptcdata-records.jpg b/tests/functional-tests/test-extraction-data/images/test-iptcdata-records.jpg
new file mode 100644
index 0000000..8ef7c40
Binary files /dev/null and b/tests/functional-tests/test-extraction-data/images/test-iptcdata-records.jpg differ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]