def category(id): category = PitchCategory.query.get(id) if category is None: abort(404) pitches=Pitch.get_pitches(id) return render_template('category.html', pitches=pitches, category=category)
def test_get_pitch_by_id(self): self.new_pitch.save_pitch() got_pitch = Pitch.get_pitches(12345) self.assertTrue(len(got_pitches) == 1)
def test_get_pitch(self): """ Test case to check if pitches can be returned. """ self.new_pitch.save_pitch() got_pitch = Pitch.get_pitches("business pitch") self.assertTrue(len(got_pitch) == 1)
def category(cat_name): ''' function to return the pitches by category ''' category = Pitch.get_pitches(cat_name) return render_template('categories.html', category=category, title=cat_name)
def test_get_pitch_by_category(self): self.new_pitch.save_pitch() got_pitches = Pitch.get_pitches(self.category_tech.id) self.assertTrue(len(got_pitches) == 1)
def test_get_pitch(self): self.new_pitch.save_pitch() saved_pitch = Pitch.get_pitches("interview") self.assertTrue(saved_pitch is not None)
def test_get_pitches(self): self.new_pitch.save_pitch() got_pitches = Pitch.get_pitches(1) self.assertTrue(len(got_pitches) == 1)
def test_get_pitches(self): self.new_Pitch.save_pitch() got_Pitch = Pitch.get_pitches() self.assertTrue(len(got_reviews) == 1)
def product(): pitches = Pitch.get_pitches('product') return render_template("product.html", pitches=pitches)
def interview(): pitches = Pitch.get_pitches('interview') return render_template("interview.html", pitches=pitches)
def business(): pitches = Pitch.get_pitches('business') return render_template("business.html", pitches=pitches)