Esempio n. 1
0
 def __init__(self):
     self.CommentText = gen.get_random_text(
         max_chars=gen.get_random_number(5, 255)
     )
     random_review = tf.get_random_row(Review)
     self.ReviewId = getattr(random_review, 'Id', None)
     random_user = tf.get_random_row(User)
     self.UserId = getattr(random_user, 'Id', None)
Esempio n. 2
0
 def __init__(self):
     location = gen.get_random_location()
     self.Place = location[2]
     self.Longitude = location[1]
     self.Latitude = location[0]
     self.Name = gen.get_random_word()
     random_user = tf.get_random_row(User)
     self.UserId = getattr(random_user, "Id", None)
     random_category = tf.get_random_row(Category)
     self.CategoryId = getattr(random_category, "Id", None)
Esempio n. 3
0
 def __init__(self):
     self.Title = gen.get_random_text(
         max_chars=gen.get_random_number(5, 45)).replace('.', '')
     self.ReviewText = gen.get_random_text(
         max_chars=gen.get_random_number(5, 1024))
     self.Score = gen.get_random_decimal(2, 1)
     self.DateCreated = gen.get_random_date()
     random_user = tf.get_random_row(User)
     self.UserId = getattr(random_user, 'Id', None)
     random_location = tf.get_random_row(Location)
     self.LocationId = getattr(random_location, 'Id', None)
Esempio n. 4
0
 def __init__(self):
     file_path = gen.download_image('https://picsum.photos/200')
     file_name = os.path.split(file_path)[-1]
     image_name = file_name.split('.')[0]
     self.ImageName = image_name
     self.Date = gen.get_random_date()
     self.FileName = file_name
     random_user = tf.get_random_row(User)
     self.UserId = getattr(random_user, 'Id', None)
     random_location = tf.get_random_row(Location)
     self.LocationId = getattr(random_location, 'Id', None)
 def __init__(self):
     random_user = tf.get_random_row(User)
     self.UserId = getattr(random_user, 'Id', None)
     random_badge = tf.get_random_row(Badge)
     self.BadgeId = getattr(random_badge, 'Id', None)
     self.DateAcquired = gen.get_random_date()
Esempio n. 6
0
 def __init__(self):
     self.Name = gen.get_random_word()
     random_row = tf.get_random_row(Category)
     self.ParentId = getattr(random_row, "Id", None)
Esempio n. 7
0
 def __init__(self):
     random_picture = tf.get_random_row(Picture)
     self.PictureId = getattr(random_picture, 'Id', None)
     random_user = tf.get_random_row(User)
     self.UserId = getattr(random_user, 'Id', None)
     self.Liked = gen.get_random_number(0, 1)
Esempio n. 8
0
 def __init__(self):
     random_user = tf.get_random_row(User)
     self.UserId = getattr(random_user, 'Id', None)
     random_location = tf.get_random_row(Location)
     self.LocationId = getattr(random_location, 'Id', None)
     self.Score = gen.get_random_decimal(2, 1)
Esempio n. 9
0
 def __init__(self):
     random_user = tf.get_random_row(User)
     self.UserId = getattr(random_user, 'Id', None)
     random_comment = tf.get_random_row(Comment)
     self.CommentId = getattr(random_comment, 'Id', None)
     self.Liked = gen.get_random_number(0, 1)
Esempio n. 10
0
 def __init__(self):
     random_review = tf.get_random_row(Review)
     self.ReviewId = getattr(random_review, 'Id', None)
     random_user = tf.get_random_row(User)
     self.UserId = getattr(random_user, 'Id', None)
     self.Liked = gen.get_random_number(0, 1)