summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2016-12-09 19:10:57 +0100
committerAdam Tauber <asciimoo@gmail.com>2016-12-09 19:11:22 +0100
commitfdf63940e8e576aee9fe5e03337d39e771f24514 (patch)
tree84f46bdcefeb9752518042a6d10a0fcb6a0e1d04 /tests
parentef2ef7974ab9bf55c5193a30544f71d8ca04f7b0 (diff)
downloadsearxng-fdf63940e8e576aee9fe5e03337d39e771f24514.tar.gz
searxng-fdf63940e8e576aee9fe5e03337d39e771f24514.zip
[fix] tests ++ flickr error
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/engines/test_deezer.py2
-rw-r--r--tests/unit/engines/test_flickr.py6
-rw-r--r--tests/unit/engines/test_flickr_noapi.py6
-rw-r--r--tests/unit/engines/test_kickass.py2
-rw-r--r--tests/unit/engines/test_searchcode_doc.py3
-rw-r--r--tests/unit/engines/test_spotify.py2
6 files changed, 9 insertions, 12 deletions
diff --git a/tests/unit/engines/test_deezer.py b/tests/unit/engines/test_deezer.py
index cfef852af..5b9f55c33 100644
--- a/tests/unit/engines/test_deezer.py
+++ b/tests/unit/engines/test_deezer.py
@@ -42,7 +42,7 @@ class TestDeezerEngine(SearxTestCase):
self.assertEqual(len(results), 1)
self.assertEqual(results[0]['title'], 'Title of track')
self.assertEqual(results[0]['url'], 'https://www.deezer.com/track/1094042')
- self.assertEqual(results[0]['content'], 'Artist Name &bull; Album Title &bull; Title of track')
+ self.assertEqual(results[0]['content'], 'Artist Name - Album Title - Title of track')
self.assertTrue('100' in results[0]['embedded'])
json = r"""
diff --git a/tests/unit/engines/test_flickr.py b/tests/unit/engines/test_flickr.py
index 2d7472a92..be97647ce 100644
--- a/tests/unit/engines/test_flickr.py
+++ b/tests/unit/engines/test_flickr.py
@@ -52,7 +52,7 @@ class TestFlickrEngine(SearxTestCase):
self.assertEqual(results[0]['url'], 'https://www.flickr.com/photos/66847915@N08/15751017054')
self.assertTrue('o.jpg' in results[0]['img_src'])
self.assertTrue('n.jpg' in results[0]['thumbnail_src'])
- self.assertTrue('Owner' in results[0]['content'])
+ self.assertTrue('Owner' in results[0]['author'])
self.assertTrue('Description' in results[0]['content'])
json = r"""
@@ -76,7 +76,7 @@ class TestFlickrEngine(SearxTestCase):
self.assertEqual(results[0]['url'], 'https://www.flickr.com/photos/66847915@N08/15751017054')
self.assertTrue('z.jpg' in results[0]['img_src'])
self.assertTrue('z.jpg' in results[0]['thumbnail_src'])
- self.assertTrue('Owner' in results[0]['content'])
+ self.assertTrue('Owner' in results[0]['author'])
self.assertTrue('Description' in results[0]['content'])
json = r"""
@@ -100,7 +100,7 @@ class TestFlickrEngine(SearxTestCase):
self.assertEqual(results[0]['url'], 'https://www.flickr.com/photos/66847915@N08/15751017054')
self.assertTrue('o.jpg' in results[0]['img_src'])
self.assertTrue('o.jpg' in results[0]['thumbnail_src'])
- self.assertTrue('Owner' in results[0]['content'])
+ self.assertTrue('Owner' in results[0]['author'])
self.assertTrue('Description' in results[0]['content'])
json = r"""
diff --git a/tests/unit/engines/test_flickr_noapi.py b/tests/unit/engines/test_flickr_noapi.py
index 6d09071bd..5f8b069e3 100644
--- a/tests/unit/engines/test_flickr_noapi.py
+++ b/tests/unit/engines/test_flickr_noapi.py
@@ -145,7 +145,7 @@ class TestFlickrNoapiEngine(SearxTestCase):
self.assertEqual(results[0]['url'], 'https://www.flickr.com/photos/59729010@N00/14001294434')
self.assertIn('k.jpg', results[0]['img_src'])
self.assertIn('n.jpg', results[0]['thumbnail_src'])
- self.assertIn('Owner', results[0]['content'])
+ self.assertIn('Owner', results[0]['author'])
# no n size, only the z size
json = """
@@ -188,7 +188,7 @@ class TestFlickrNoapiEngine(SearxTestCase):
self.assertEqual(results[0]['url'], 'https://www.flickr.com/photos/59729010@N00/14001294434')
self.assertIn('z.jpg', results[0]['img_src'])
self.assertIn('z.jpg', results[0]['thumbnail_src'])
- self.assertIn('Owner', results[0]['content'])
+ self.assertIn('Owner', results[0]['author'])
# no z or n size
json = """
@@ -231,7 +231,7 @@ class TestFlickrNoapiEngine(SearxTestCase):
self.assertEqual(results[0]['url'], 'https://www.flickr.com/photos/59729010@N00/14001294434')
self.assertIn('o.jpg', results[0]['img_src'])
self.assertIn('o.jpg', results[0]['thumbnail_src'])
- self.assertIn('Owner', results[0]['content'])
+ self.assertIn('Owner', results[0]['author'])
# no image test
json = """
diff --git a/tests/unit/engines/test_kickass.py b/tests/unit/engines/test_kickass.py
index 96c17911c..7e1225da3 100644
--- a/tests/unit/engines/test_kickass.py
+++ b/tests/unit/engines/test_kickass.py
@@ -98,7 +98,7 @@ class TestKickassEngine(SearxTestCase):
self.assertEqual(len(results), 1)
self.assertEqual(results[0]['title'], 'This should be the title')
self.assertEqual(results[0]['url'], 'https://kickass.cd/url.html')
- self.assertEqual(results[0]['content'], 'Posted by riri in Other &gt; Unsorted')
+ self.assertEqual(results[0]['content'], 'Posted by riri in Other > Unsorted')
self.assertEqual(results[0]['seed'], 10)
self.assertEqual(results[0]['leech'], 1)
self.assertEqual(results[0]['filesize'], 449)
diff --git a/tests/unit/engines/test_searchcode_doc.py b/tests/unit/engines/test_searchcode_doc.py
index 7228613ed..d02bb7a44 100644
--- a/tests/unit/engines/test_searchcode_doc.py
+++ b/tests/unit/engines/test_searchcode_doc.py
@@ -56,9 +56,6 @@ class TestSearchcodeDocEngine(SearxTestCase):
self.assertEqual(len(results), 1)
self.assertEqual(results[0]['title'], '[Type] Namespace test')
self.assertEqual(results[0]['url'], 'http://url')
- self.assertIn('Synopsis', results[0]['content'])
- self.assertIn('Type', results[0]['content'])
- self.assertIn('test', results[0]['content'])
self.assertIn('Description', results[0]['content'])
json = r"""
diff --git a/tests/unit/engines/test_spotify.py b/tests/unit/engines/test_spotify.py
index fd274abbd..e37c344d2 100644
--- a/tests/unit/engines/test_spotify.py
+++ b/tests/unit/engines/test_spotify.py
@@ -90,7 +90,7 @@ class TestSpotifyEngine(SearxTestCase):
self.assertEqual(len(results), 1)
self.assertEqual(results[0]['title'], 'Title of track')
self.assertEqual(results[0]['url'], 'https://open.spotify.com/track/2GzvFiedqW8hgqUpWcASZa')
- self.assertEqual(results[0]['content'], 'Artist Name &bull; Album Title &bull; Title of track')
+ self.assertEqual(results[0]['content'], 'Artist Name - Album Title - Title of track')
self.assertIn('1000', results[0]['embedded'])
json = """