def test_basic_case(self): heading = items.HeadingItem(name='Test heading') self.assertEquals(heading.to_api()['name'], 'Test heading')
def test_fixed_values(self): heading = items.HeadingItem(name='Test heading') self.assertEquals(heading.to_api()['menu_type'], 'heading')
def test_default_values(self): heading = items.HeadingItem(name='Test heading') self.assertEquals(heading.to_api()['heading_level'], 1)
def test_overwritten_default_values(self): heading = items.HeadingItem(name='Test heading', heading_level=42) self.assertEquals(heading.to_api()['heading_level'], 42)
def test_no_unspecified_keys_in_dict(self): # We should be as empty as possible. heading = items.HeadingItem(name='Test heading') self.assertFalse('description' in heading.to_api())