def test__has_folclor(self): from the_tale.blogs.tests import helpers as blogs_helpers blogs_helpers.prepair_forum() blogs_helpers.create_post_for_meta_object(self.account, 'folclor-1-caption', 'folclor-1-text', meta_relations.Place.create_from_object(self.place_1)) blogs_helpers.create_post_for_meta_object(self.account, 'folclor-2-caption', 'folclor-2-text', meta_relations.Place.create_from_object(self.place_1)) self.check_html_ok(self.request_html(url('game:places:show', self.place_1.id)), texts=[('pgf-no-folclor', 0), 'folclor-1-caption', 'folclor-2-caption'])
def test_folclor(self): from the_tale.blogs.tests import helpers as blogs_helpers blogs_helpers.prepair_forum() blogs_helpers.create_post_for_meta_object(self.account_1, 'folclor-1-caption', 'folclor-1-text', meta_relations.Companion.create_from_object(self.companion_1)) blogs_helpers.create_post_for_meta_object(self.account_2, 'folclor-2-caption', 'folclor-2-text', meta_relations.Companion.create_from_object(self.companion_1)) self.check_html_ok(self.request_html(self.requested_url_1), texts=[('pgf-no-folclor', 0), 'folclor-1-caption', 'folclor-2-caption'])
def test_folclor(self): from the_tale.blogs.tests import helpers as blogs_helpers blogs_helpers.prepair_forum() artifact = ArtifactRecordPrototype(ArtifactRecord.objects.all()[0]) blogs_helpers.create_post_for_meta_object(self.account_1, 'folclor-1-caption', 'folclor-1-text', meta_relations.Artifact.create_from_object(artifact)) blogs_helpers.create_post_for_meta_object(self.account_2, 'folclor-2-caption', 'folclor-2-text', meta_relations.Artifact.create_from_object(artifact)) self.check_html_ok(self.request_html(url('guide:artifacts:info', artifact.id)), texts=[('pgf-no-folclor', 0), 'folclor-1-caption', 'folclor-2-caption'])
def test_folclor(self): from the_tale.blogs.tests import helpers as blogs_helpers blogs_helpers.prepair_forum() mob = MobRecordPrototype(MobRecord.objects.all()[0]) blogs_helpers.create_post_for_meta_object(self.account_1, 'folclor-1-caption', 'folclor-1-text', meta_relations.Mob.create_from_object(mob)) blogs_helpers.create_post_for_meta_object(self.account_2, 'folclor-2-caption', 'folclor-2-text', meta_relations.Mob.create_from_object(mob)) self.check_html_ok(self.request_html(url('guide:mobs:show', mob.id)), texts=[('pgf-no-folclor', 0), 'folclor-1-caption', 'folclor-2-caption'])
def test_folclor(self): from the_tale.blogs.tests import helpers as blogs_helpers blogs_helpers.prepair_forum() mob = MobRecordPrototype(MobRecord.objects.all()[0]) blogs_helpers.create_post_for_meta_object(self.account_1, 'folclor-1-caption', 'folclor-1-text', meta_relations.Mob.create_from_object(mob)) blogs_helpers.create_post_for_meta_object(self.account_2, 'folclor-2-caption', 'folclor-2-text', meta_relations.Mob.create_from_object(mob)) self.check_html_ok(self.request_html(url('guide:mobs:info', mob.id)), texts=[('pgf-no-folclor', 0), 'folclor-1-caption', 'folclor-2-caption'])
def test_folclor(self): from the_tale.blogs.tests import helpers as blogs_helpers blogs_helpers.prepair_forum() blogs_helpers.create_post_for_meta_object( self.account_1, 'folclor-1-caption', 'folclor-1-text', meta_relations.Companion.create_from_object(self.companion_1)) blogs_helpers.create_post_for_meta_object( self.account_2, 'folclor-2-caption', 'folclor-2-text', meta_relations.Companion.create_from_object(self.companion_1)) self.check_html_ok(self.request_html(self.requested_url_1), texts=[('pgf-no-folclor', 0), 'folclor-1-caption', 'folclor-2-caption'])
def test_show__folclor(self): from the_tale.blogs.tests import helpers as blogs_helpers blogs_helpers.prepair_forum() bill_data = PlaceRenaming(place_id=self.place2.id, name_forms=names.generator().get_test_name('new_name_2')) self.create_bills(1, self.account1, 'Caption-a2-%d', 'rationale-a2-%d', bill_data) bill = BillPrototype._db_latest() blogs_helpers.create_post_for_meta_object(self.account1, 'folclor-1-caption', 'folclor-1-text', meta_relations.Bill.create_from_object(bill)) blogs_helpers.create_post_for_meta_object(self.account1, 'folclor-2-caption', 'folclor-2-text', meta_relations.Bill.create_from_object(bill)) texts = ['folclor-1-caption', 'folclor-1-text', 'folclor-2-caption'] self.check_html_ok(self.request_html(reverse('game:bills:show', args=[bill.id])), texts=texts)
def test_folclor(self): from the_tale.blogs.tests import helpers as blogs_helpers blogs_helpers.prepair_forum() artifact = ArtifactRecordPrototype(ArtifactRecord.objects.all()[0]) blogs_helpers.create_post_for_meta_object( self.account_1, "folclor-1-caption", "folclor-1-text", meta_relations.Artifact.create_from_object(artifact) ) blogs_helpers.create_post_for_meta_object( self.account_2, "folclor-2-caption", "folclor-2-text", meta_relations.Artifact.create_from_object(artifact) ) self.check_html_ok( self.request_html(reverse("guide:artifacts:show", args=[artifact.id])), texts=[("pgf-no-folclor", 0), "folclor-1-caption", "folclor-2-caption"], )
def test_folclor(self): from the_tale.blogs.tests import helpers as blogs_helpers blogs_helpers.prepair_forum() artifact = ArtifactRecordPrototype(ArtifactRecord.objects.all()[0]) blogs_helpers.create_post_for_meta_object( self.account_1, 'folclor-1-caption', 'folclor-1-text', meta_relations.Artifact.create_from_object(artifact)) blogs_helpers.create_post_for_meta_object( self.account_2, 'folclor-2-caption', 'folclor-2-text', meta_relations.Artifact.create_from_object(artifact)) self.check_html_ok(self.request_html( reverse('guide:artifacts:show', args=[artifact.id])), texts=[('pgf-no-folclor', 0), 'folclor-1-caption', 'folclor-2-caption'])
def test_folclor(self): from the_tale.blogs.tests import helpers as blogs_helpers blogs_helpers.prepair_forum() artifact = logic.construct_from_model( models.ArtifactRecord.objects.all()[0]) blogs_helpers.create_post_for_meta_object( self.account_1, 'folclor-1-caption', 'folclor-1-text', meta_relations.Artifact.create_from_object(artifact)) blogs_helpers.create_post_for_meta_object( self.account_2, 'folclor-2-caption', 'folclor-2-text', meta_relations.Artifact.create_from_object(artifact)) self.check_html_ok(self.request_html( url('guide:artifacts:info', artifact.id)), texts=[('pgf-no-folclor', 0), 'folclor-1-caption', 'folclor-2-caption'])
def test_show_no_folclor(self): from the_tale.blogs.tests import helpers as blogs_helpers blogs_helpers.prepair_forum() blogs_helpers.create_post_for_meta_object( self.account_2, 'folclor-1-caption', 'folclor-1-text', meta_relations.Account.create_from_object(self.account_1), vote_by=self.account_1) blogs_helpers.create_post_for_meta_object( self.account_3, 'folclor-2-caption', 'folclor-2-text', meta_relations.Account.create_from_object(self.account_1), vote_by=self.account_1) blogs_helpers.create_post_for_meta_object( self.account_3, 'folclor-3-caption', 'folclor-3-text', meta_relations.Account.create_from_object(self.account_1)) self.request_login(self.account_2.email) self.check_html_ok(self.request_html( reverse('accounts:show', args=[self.account_2.id])), texts=[ 'pgf-no-folclor', ('folclor-1-caption', 0), ('folclor-2-caption', 0), ('folclor-3-caption', 0) ])
def test_folclor(self): from the_tale.blogs.tests import helpers as blogs_helpers blogs_helpers.prepair_forum() blogs_helpers.create_post_for_meta_object( self.accounts_factory.create_account(), 'folclor-1-caption', 'folclor-1-text', meta_relations.Hero.create_from_object(self.hero), vote_by=self.account) blogs_helpers.create_post_for_meta_object( self.accounts_factory.create_account(), 'folclor-2-caption', 'folclor-2-text', meta_relations.Hero.create_from_object(self.hero), vote_by=self.account) blogs_helpers.create_post_for_meta_object( self.accounts_factory.create_account(), 'folclor-3-caption', 'folclor-3-text', meta_relations.Hero.create_from_object(self.hero)) self.check_html_ok( self.request_html(url('game:heroes:show', self.hero.id)), texts=(('pgf-no-folclor', 0), 'folclor-1-caption', 'folclor-2-caption', ('folclor-3-caption', 0)))
def test_folclor(self): from the_tale.blogs.tests import helpers as blogs_helpers blogs_helpers.prepair_forum() blogs_helpers.create_post_for_meta_object( self.accounts_factory.create_account(), 'folclor-1-caption', 'folclor-1-text', meta_relations.Clan.create_from_object(self.clan), vote_by=self.account) blogs_helpers.create_post_for_meta_object( self.accounts_factory.create_account(), 'folclor-2-caption', 'folclor-2-text', meta_relations.Clan.create_from_object(self.clan), vote_by=self.account) blogs_helpers.create_post_for_meta_object( self.accounts_factory.create_account(), 'folclor-3-caption', 'folclor-3-text', meta_relations.Clan.create_from_object(self.clan)) self.check_html_ok(self.request_html(self.show_url), texts=[('pgf-no-folclor', 0), 'folclor-1-caption', 'folclor-2-caption', ('folclor-3-caption', 0)])
def test_folclor(self): blogs_helpers.prepair_forum() blogs_helpers.create_post_for_meta_object(self.accounts_factory.create_account(), 'folclor-1-caption', 'folclor-1-text', meta_relations.Hero.create_from_object(self.hero), vote_by=self.account) blogs_helpers.create_post_for_meta_object(self.accounts_factory.create_account(), 'folclor-2-caption', 'folclor-2-text', meta_relations.Hero.create_from_object(self.hero), vote_by=self.account) blogs_helpers.create_post_for_meta_object(self.accounts_factory.create_account(), 'folclor-3-caption', 'folclor-3-text', meta_relations.Hero.create_from_object(self.hero)) self.check_html_ok(self.request_html(url('game:heroes:show', self.hero.id)), texts=(('pgf-no-folclor', 0), 'folclor-1-caption', 'folclor-2-caption', ('folclor-3-caption', 0)))
def test_show_no_folclor(self): from the_tale.blogs.tests import helpers as blogs_helpers blogs_helpers.prepair_forum() blogs_helpers.create_post_for_meta_object(self.account_2, 'folclor-1-caption', 'folclor-1-text', meta_relations.Account.create_from_object(self.account_1), vote_by=self.account_1) blogs_helpers.create_post_for_meta_object(self.account_3, 'folclor-2-caption', 'folclor-2-text', meta_relations.Account.create_from_object(self.account_1), vote_by=self.account_1) blogs_helpers.create_post_for_meta_object(self.account_3, 'folclor-3-caption', 'folclor-3-text', meta_relations.Account.create_from_object(self.account_1)) self.request_login('*****@*****.**') self.check_html_ok(self.request_html(reverse('accounts:show', args=[self.account_2.id])), texts=['pgf-no-folclor', ('folclor-1-caption', 0), ('folclor-2-caption', 0), ('folclor-3-caption', 0)])