Commit f3ab1469 authored by okhin's avatar okhin 🚴

Fixing the test. Importer.url is '' not None when empty

parent d11a53dd
Pipeline #833 passed with stages
in 50 seconds
......@@ -56,7 +56,8 @@ class ImporterAdminTest(TestCase):
name='test importer',
category='repr',
campaign = self.campaign,
file=json_file
file=json_file,
url=''
)
self.site = AdminSite()
......@@ -131,6 +132,7 @@ class ImporterTest(TestCase):
)
self.assertEqual(importer.kind(), None)
importer.file = 'a'
importer.url = ''
self.assertEqual(importer.kind(), 'file')
importer.url = 'http://www.example.com/'
self.assertEqual(importer.kind(), 'url')
......@@ -144,7 +146,8 @@ class ImporterTest(TestCase):
name='test importer',
category='repr',
campaign = self.campaign,
file=json_file
file=json_file,
url=''
)
self.assertEqual(importer.kind(), 'file')
importer.handle()
......@@ -164,7 +167,8 @@ class ImporterTest(TestCase):
name='test updater',
category='updater',
campaign=self.campaign,
file=csv_file
file=csv_file,
url=''
)
self.assertEqual(importer.kind(), 'file')
importer.handle()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment