Exemplo n.º 1
0
    def test_get_existing_tag(self):
        t = Tag('yay')
        Session.add(t)

        self.assertEqual(t, Tag.get('yay'))
Exemplo n.º 2
0
    def test_new_tag(self):
        t = Tag.get('yay')

        self.assertEqual(t.name, 'yay')
Exemplo n.º 3
0
 def save_recipe(self):
     self.recipe.name = self.name.text()
     self.recipe.description = self.description.toPlainText()
     self.recipe.tags = [Tag.get(t) for t in self.tags.text().split(';')] if self.tags.text() else []
     Session.add(self.recipe)
Exemplo n.º 4
0
 def save_recipe(self):
     self.recipe.name = self.name.text()
     self.recipe.description = self.description.toPlainText()
     self.recipe.tags = [Tag.get(t) for t in self.tags.text().split(';')
                         ] if self.tags.text() else []
     Session.add(self.recipe)
Exemplo n.º 5
0
    def test_get_existing_tag(self):
        t = Tag('yay')
        Session.add(t)

        self.assertEqual(t, Tag.get('yay'))
Exemplo n.º 6
0
    def test_new_tag(self):
        t = Tag.get('yay')

        self.assertEqual(t.name, 'yay')