diff --git a/python2/koans/about_asserts.py b/python2/koans/about_asserts.py index 61b53ada1..8905cb3b2 100644 --- a/python2/koans/about_asserts.py +++ b/python2/koans/about_asserts.py @@ -15,26 +15,26 @@ def test_assert_truth(self): # # http://bit.ly/about_asserts - self.assertTrue(False) # This should be true + self.assertTrue(True) # This should be true def test_assert_with_message(self): """ Enlightenment may be more easily achieved with appropriate messages. """ - self.assertTrue(False, "This should be true -- Please fix this") + self.assertTrue(True, "This should be true -- Please fix this") def test_fill_in_values(self): """ Sometimes we will ask you to fill in the values """ - self.assertEqual(__, 1 + 1) + self.assertEqual(2, 1 + 1) def test_assert_equality(self): """ To understand reality, we must compare our expectations against reality. """ - expected_value = __ + expected_value = 2 actual_value = 1 + 1 self.assertTrue(expected_value == actual_value) @@ -42,7 +42,7 @@ def test_a_better_way_of_asserting_equality(self): """ Some ways of asserting equality are better than others. """ - expected_value = __ + expected_value = 2 actual_value = 1 + 1 self.assertEqual(expected_value, actual_value) @@ -53,7 +53,7 @@ def test_that_unittest_asserts_work_the_same_way_as_python_asserts(self): """ # This throws an AssertionError exception - assert False + assert True def test_that_sometimes_we_need_to_know_the_class_type(self): """ @@ -72,7 +72,7 @@ def test_that_sometimes_we_need_to_know_the_class_type(self): # # See for yourself: - self.assertEqual(__, "naval".__class__) # It's str, not + self.assertEqual(str, "naval".__class__) # It's str, not # Need an illustration? More reading can be found here: # diff --git a/python2/koans/about_dictionaries.py b/python2/koans/about_dictionaries.py index 8591b5439..8458665db 100644 --- a/python2/koans/about_dictionaries.py +++ b/python2/koans/about_dictionaries.py @@ -13,40 +13,40 @@ def test_creating_dictionaries(self): empty_dict = dict() self.assertEqual(dict, type(empty_dict)) self.assertEqual(dict(), empty_dict) - self.assertEqual(__, len(empty_dict)) + self.assertEqual(0, len(empty_dict)) def test_dictionary_literals(self): empty_dict = {} self.assertEqual(dict, type(empty_dict)) babel_fish = {'one': 'uno', 'two': 'dos'} - self.assertEqual(__, len(babel_fish)) + self.assertEqual(2, len(babel_fish)) def test_accessing_dictionaries(self): babel_fish = {'one': 'uno', 'two': 'dos'} - self.assertEqual(__, babel_fish['one']) - self.assertEqual(__, babel_fish['two']) + self.assertEqual('uno', babel_fish['one']) + self.assertEqual('dos', babel_fish['two']) def test_changing_dictionaries(self): babel_fish = {'one': 'uno', 'two': 'dos'} babel_fish['one'] = 'eins' - expected = {'two': 'dos', 'one': __} + expected = {'two': 'dos', 'one': 'eins'} self.assertEqual(expected, babel_fish) def test_dictionar