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)
def test_get_user_pitch(self): self.new_pitch.save_pitch() get_pitch = Pitch.get_user_pitch(1) self.assertEqual(len(get_pitch) == 1)
def test_get_user_pitch(self): self.new_pitch.save_pitch() get_pitch = Pitch.get_user_pitch(1) self.assertTrue(len(get_pitch) > 0)