Example #1
0
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)
Example #2
0
 def test_get_pitch_by_id(self):
     self.new_pitch.save_pitch()
     got_pitch = Pitch.get_pitches(12345)
     self.assertTrue(len(got_pitches) == 1)    
 
     
     
                         
Example #3
0
    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)
Example #4
0
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)
Example #5
0
    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)
Example #6
0
 def test_get_pitch(self):
     self.new_pitch.save_pitch()
     saved_pitch = Pitch.get_pitches("interview")
     self.assertTrue(saved_pitch is not None)
Example #7
0
 def test_get_pitches(self):
     self.new_pitch.save_pitch()
     got_pitches = Pitch.get_pitches(1)
     self.assertTrue(len(got_pitches) == 1)
Example #8
0
 def test_get_pitches(self):
     self.new_Pitch.save_pitch()
     got_Pitch = Pitch.get_pitches()
     self.assertTrue(len(got_reviews) == 1)
Example #9
0
def product():
    pitches = Pitch.get_pitches('product')
    return render_template("product.html", pitches=pitches)
Example #10
0
def interview():
    pitches = Pitch.get_pitches('interview')
    return render_template("interview.html", pitches=pitches)
Example #11
0
def business():
    pitches = Pitch.get_pitches('business')
    return render_template("business.html", pitches=pitches)