def test_store_saves_tags(self):
    self.stack = stack.Stack(self.ctx, 'tags_stack', self.tmpl)
    self.stack.store()
    db_tags = stack_tag_object.StackTagList.get(self.stack.context, self.stack.id)
    self.assertIsNone(db_tags)
    self.stack = stack.Stack(self.ctx, 'tags_stack2', self.tmpl, tags=['tag1', 'tag2'])
    self.stack.store()
    db_tags = stack_tag_object.StackTagList.get(self.stack.context, self.stack.id)
    self.assertEqual('tag1', db_tags[0].tag)
    self.assertEqual('tag2', db_tags[1].tag)
def test_store_saves_tags(self):
    self.stack = stack.Stack(self.ctx, 'tags_stack', self.tmpl)
    self.stack.store()
    db_tags = stack_tag_object.StackTagList.get(self.stack.context, self.stack.id)
    self.assertIsNone(db_tags)
    self.stack = stack.Stack(self.ctx, 'tags_stack2', self.tmpl, tags=['tag1', 'tag2'])
    self.stack.store()
    db_tags = stack_tag_object.StackTagList.get(self.stack.context, self.stack.id)
    self.assertEqual('tag1', db_tags[0].tag)
    self.assertEqual('tag2', db_tags[1].tag)