Skip to content

Commit d225e2d

Browse files
committed
Fixed failing test
BooleanFields will now set a unicode "FALSE" as False.
1 parent 165c13c commit d225e2d

File tree

3 files changed

+74
-68
lines changed

3 files changed

+74
-68
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name = "django-simple-import",
5-
version = "1.15",
5+
version = "1.16",
66
author = "David Burke",
77
author_email = "david@burkesoftware.com",
88
description = ("A Django import tool easy enough your users could use it"),

simple_import/tests.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,23 @@ def setUp(self):
2626
import_file = File(fp),
2727
import_setting = self.import_setting,
2828
import_type = u'N',
29-
)
30-
29+
)
30+
3131
def test_import(self):
3232
""" Make sure we can upload the file and match columns """
3333
import_log_ct_id = ContentType.objects.get_for_model(ImportLog).id
34-
34+
3535
self.assertEqual(ImportLog.objects.count(), 1)
36-
36+
3737
with open(self.absolute_path) as fp:
3838
response = self.client.post(reverse('simple_import-start_import'), {
3939
'name': 'This is a test',
4040
'import_file': fp,
4141
'import_type': "N",
4242
'model': import_log_ct_id}, follow=True)
43-
43+
4444
self.assertEqual(ImportLog.objects.count(), 2)
45-
45+
4646
self.assertRedirects(response, reverse('simple_import-match_columns', kwargs={'import_log_id': ImportLog.objects.all()[1].id}))
4747
self.assertContains(response, '<h1>Match Columns</h1>')
4848
# Check matching
@@ -52,11 +52,11 @@ def test_import(self):
5252
self.assertContains(response, '<option value="import_setting">import setting (Required) (Related)</option>')
5353
# Check Sample Data
5454
self.assertContains(response, '/tmp/foo.xls')
55-
55+
5656
def test_match_columns(self):
5757
""" Test matching columns view """
5858
self.assertEqual(ColumnMatch.objects.count(), 0)
59-
59+
6060
response = self.client.post(
6161
reverse('simple_import-match_columns', kwargs={'import_log_id': self.import_log.id}), {
6262
'columnmatch_set-TOTAL_FORMS':6,
@@ -87,15 +87,15 @@ def test_match_columns(self):
8787
'columnmatch_set-5-import_setting':self.import_setting.id,
8888
'columnmatch_set-5-field_name':'import_type',
8989
}, follow=True)
90-
90+
9191
self.assertRedirects(response, reverse('simple_import-match_relations', kwargs={'import_log_id': self.import_log.id}))
9292
self.assertContains(response, '<h1>Match Relations and Prepare to Run Import</h1>')
9393
self.assertEqual(ColumnMatch.objects.count(), 6)
94-
94+
9595
def test_match_relations(self):
9696
""" Test matching relations view """
9797
self.assertEqual(RelationalMatch.objects.count(), 0)
98-
98+
9999
response = self.client.post(
100100
reverse('simple_import-match_relations', kwargs={'import_log_id': self.import_log.id}), {
101101
'relationalmatch_set-TOTAL_FORMS':2,
@@ -113,6 +113,6 @@ def test_match_relations(self):
113113

114114
self.assertRedirects(response, reverse('simple_import-do_import', kwargs={'import_log_id': self.import_log.id}))
115115
self.assertContains(response, '<h1>Import Results</h1>')
116-
116+
117117
self.assertEqual(RelationalMatch.objects.count(), 2)
118118

0 commit comments

Comments
 (0)