Пример #1
0
 def __init__(self):
     self.parent = None
     self.dirty = False
     self.datafile = None
     self.force_tags = ForceTagsController(self, Tags('Force Tags'))
     self.default_tags = DefaultTagsController(self, Tags('Default Tags'))
     self._setting_table = self
Пример #2
0
 def test_settings_patch(self):
     tags = Tags("Tags")
     assert_equals(tags.as_list(), ["Tags"])
     tags.value = ["tag1", "tag2"]
     assert_equals(tags.as_list(), ["Tags", "tag1", "tag2"])
 def test_settings_patch(self):
     tags = Tags('Tags')
     assert_equals(tags.as_list(), ['Tags'])
     tags.value = ['tag1', 'tag2']
     assert_equals(tags.as_list(), ['Tags', 'tag1', 'tag2'])
Пример #4
0
 def test_value_with_empty_fixture(self):
     assert_equals(TagsController(self.parent, Tags('Tags')).display_value, '')
Пример #5
0
 def setUp(self):
     self.tags = Tags('Force Tags')
     self.tags.value = ['f1', 'f2']
     self.parent = _FakeParent()
     self.ctrl = TagsController(self.parent, self.tags)
Пример #6
0
 def test_settings_patch(self):
     tags = Tags('Tags')
     assert_equal(tags.as_list(),['Tags'])
     tags.value = ['tag1','tag2']
     assert_equal(tags.as_list(),['Tags', 'tag1', 'tag2'])