Exemplo 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)
Exemplo 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)
Exemplo 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)