예제 #1
0
 def test_basic_case(self):
     heading = items.HeadingItem(name='Test heading')
     self.assertEquals(heading.to_api()['name'], 'Test heading')
예제 #2
0
 def test_fixed_values(self):
     heading = items.HeadingItem(name='Test heading')
     self.assertEquals(heading.to_api()['menu_type'], 'heading')
예제 #3
0
 def test_default_values(self):
     heading = items.HeadingItem(name='Test heading')
     self.assertEquals(heading.to_api()['heading_level'], 1)
예제 #4
0
 def test_overwritten_default_values(self):
     heading = items.HeadingItem(name='Test heading',
                                 heading_level=42)
     self.assertEquals(heading.to_api()['heading_level'], 42)
예제 #5
0
 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())