From 161aa50a9ef158e5b399af8d0e36f33ef6c0a47b Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Thu, 5 Feb 2015 15:33:42 +0000 Subject: [PATCH] Test tweaks --- wagtail/wagtailadmin/tests/test_blocks.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/wagtail/wagtailadmin/tests/test_blocks.py b/wagtail/wagtailadmin/tests/test_blocks.py index 4600793a2..78c94bea9 100644 --- a/wagtail/wagtailadmin/tests/test_blocks.py +++ b/wagtail/wagtailadmin/tests/test_blocks.py @@ -32,7 +32,6 @@ class TestFieldBlock(unittest.TestCase): self.assertIn('This field is required.', html) - @unittest.expectedFailure def test_choicefield_render(self): block = blocks.FieldBlock(forms.ChoiceField(choices=( ('choice-1', "Choice 1"), @@ -40,7 +39,7 @@ class TestFieldBlock(unittest.TestCase): ))) html = block.render('choice-2') - self.assertEqual(html, "Choice 2") + self.assertEqual(html, "choice-2") def test_choicefield_render_form(self): block = blocks.FieldBlock(forms.ChoiceField(choices=( @@ -112,7 +111,6 @@ class TestStructBlock(unittest.TestCase): self.assertEqual(list(block.child_blocks.keys()), ['title', 'link', 'classname']) - @unittest.expectedFailure # Field label not being used in HTML def test_render(self): class LinkBlock(blocks.StructBlock): title = blocks.FieldBlock(forms.CharField(label="Title")) @@ -124,9 +122,9 @@ class TestStructBlock(unittest.TestCase): 'link': 'http://www.wagtail.io', }) - self.assertIn('
Title
', html) + self.assertIn('
title
', html) self.assertIn('
Wagtail site
', html) - self.assertIn('
Link
', html) + self.assertIn('
link
', html) self.assertIn('
http://www.wagtail.io
', html) def test_render_form(self):