예제 #1
0
def review(author, user):
    return factories.ReviewFactory(author=author, user=user)
예제 #2
0
 def get(self, **kwargs):
     return factories.ReviewFactory(**kwargs)
예제 #3
0
def test_comment_model_method_works(db, method):
    user = f.UserFactory(email='*****@*****.**', password='******')
    restaurant = f.RestaurantFactory(lat=23.2223443, lon=-243.222334)
    review = f.ReviewFactory(restaurant=restaurant, user=user.profile)
    comment = f.CommentFactory(review=review, user=user.profile)
    assert getattr(comment, method)