Ejemplo n.º 1
0
    def information_relations(self):
        awards = AwardFactory.create_batch(3)
        credits = CreditFactory.create_batch(3)
        genres = GenreFactory.create_batch(3)

        return InformationFactory(genres=genres,
                                  credits=credits,
                                  awards=awards)
Ejemplo n.º 2
0
    def information_relations(self):
        awards = AwardFactory.create_batch(3)
        developers = DeveloperFactory.create_batch(3)
        genres = GenreFactory.create_batch(3)

        return InformationFactory(genres=genres,
                                  developers=developers,
                                  awards=awards)
Ejemplo n.º 3
0
    def game(self):
        credit = CreditFactory()
        award_game = AwardFactory()

        game = GameFactory()
        InformationFactory(game=game, awards=[award_game], credits=[credit])

        ImageFactory(game=game)
        PlatformFactory()
        PackageFactory(game=game)

        VideoFactory(game=game)
        SoundtrackFactory(game=game)

        return game
Ejemplo n.º 4
0
    def __multiple_data__(self, genre, award, *args, **kwargs):
        for i in range(1, kwargs['loop'] + 1):
            self.stdout.write("Game {}:".format(i))
            developer = DeveloperFactory.create_batch(kwargs['non_loop'])
            self.stdout.write("\tDeveloper: {}".format("." *
                                                       kwargs['non_loop']))

            information = InformationFactory.create(
                awards=[award[i % kwargs['non_loop']]],
                developers=developer,
                genres=[genre[i % kwargs['non_loop']]])
            self.stdout.write("\tInformation: .")
            ImageFactory.create_batch(kwargs['media'], game=information.game)
            self.stdout.write("\tImage: {}".format("." * kwargs['media']))
            VideoFactory.create_batch(kwargs['video'], game=information.game)
            self.stdout.write("\tVideo: {}".format("." * kwargs['video']))
            PackageFactory(game=information.game)
            self.stdout.write("\tPackage: .")
Ejemplo n.º 5
0
 def test_description_validation(self, description, errors_dict, game):
     information = InformationFactory.build(description=description,
                                            game=game)
     validation_test(information, errors_dict)
Ejemplo n.º 6
0
 def test_launch_year_validation(self, launch_year, errors_dict, game):
     information = InformationFactory.build(launch_year=launch_year,
                                            game=game)
     validation_test(information, errors_dict)
Ejemplo n.º 7
0
 def information_created(self):
     return InformationFactory()
Ejemplo n.º 8
0
 def __information__(self, genres):
     return InformationFactory(genres=genres).game
Ejemplo n.º 9
0
 def information(self):
     information = InformationFactory()
     rating = Rating(vote=True, user_voter="test", information=information)
     rating.save()
     return information