Esempio n. 1
0
def profile(uname):
    user = User. query.filter_by(username = uname).first()
    if user is None:
        abort(404)

    pitches = Pitch.get_user_pitch(user.id)

    return render_template("profile/profile.html", pitches = pitches , user = user)
Esempio n. 2
0
 def test_get_user_pitch(self):
     self.new_pitch.save_pitch()
     get_pitch = Pitch.get_user_pitch(1)
     self.assertEqual(len(get_pitch) == 1)
Esempio n. 3
0
 def test_get_user_pitch(self):
     self.new_pitch.save_pitch()
     get_pitch = Pitch.get_user_pitch(1)
     self.assertTrue(len(get_pitch) > 0)