コード例 #1
0
ファイル: tests.py プロジェクト: bobfp/acme_ads
    def setUp(self):
        newspaper1 = Newspaper()
        newspaper1.name = 'Test Newspaper 1'
        newspaper1.save()

        newspaper2 = Newspaper()
        newspaper2.name = 'Test Newspaper 2'
        newspaper2.save()

        newspaper3 = Newspaper()
        newspaper3.name = 'Test Newspaper 3'
        newspaper3.save()

        ad1 = Ad()
        ad1.name = 'Test Ad 1'
        ad1.id = 1
        ad1.content = 'Content 1'
        ad1.save()

        ad2 = Ad()
        ad2.name = 'Test Ad 2'
        ad2.id = 2
        ad2.content = 'Content 2'
        ad2.save()
        ad2.newspapers.add(newspaper1, newspaper2)
        ad2.save()

        ad3 = Ad()
        ad2.id = 3
        ad3.name = 'Test Ad 3'
        ad3.content = 'Content 3'
        ad3.save()

        self.browser = webdriver.Firefox()
        self.browser.implicitly_wait(3)
コード例 #2
0
ファイル: tests.py プロジェクト: bcoop713/acme_ads
	def setUp(self):
		newspaper1 = Newspaper()
		newspaper1.name = 'Test Newspaper 1'
		newspaper1.save()

		newspaper2 = Newspaper()
		newspaper2.name = 'Test Newspaper 2'
		newspaper2.save()

		newspaper3 = Newspaper()
		newspaper3.name = 'Test Newspaper 3'
		newspaper3.save()

		ad1 = Ad()
		ad1.name = 'Test Ad 1'
		ad1.id = 1
		ad1.content = 'Content 1'
		ad1.save()

		ad2 = Ad()
		ad2.name = 'Test Ad 2'
		ad2.id = 2
		ad2.content = 'Content 2'
		ad2.save()
		ad2.newspapers.add(newspaper1, newspaper2)
		ad2.save()

		ad3 = Ad()
		ad2.id = 3
		ad3.name = 'Test Ad 3'
		ad3.content = 'Content 3'
		ad3.save()

		self.browser = webdriver.Firefox()
		self.browser.implicitly_wait(3)
コード例 #3
0
ファイル: test_views.py プロジェクト: bcoop713/acme_ads
	def setUp(self):
		ad1 = Ad()
		ad1.name = 'Test Ad 1'
		ad1.content = 'Content 1'
		ad1.save()

		ad2 = Ad()
		ad2.name = 'Test Ad 2'
		ad2.content = 'Content 2'
		ad2.save()
コード例 #4
0
    def setUp(self):
        ad1 = Ad()
        ad1.name = 'Test Ad 1'
        ad1.content = 'Content 1'
        ad1.save()

        ad2 = Ad()
        ad2.name = 'Test Ad 2'
        ad2.content = 'Content 2'
        ad2.save()
コード例 #5
0
ファイル: test_views.py プロジェクト: bcoop713/acme_ads
	def setUp(self):
		newspaper1 = Newspaper(name='Test Newspaper 1')
		newspaper1.save()

		ad = Ad()
		ad.name = 'Name 1'
		ad.content = 'Content 1'
		ad.save()
コード例 #6
0
    def setUp(self):
        newspaper1 = Newspaper(name='Test Newspaper 1')
        newspaper1.save()

        ad = Ad()
        ad.name = 'Name 1'
        ad.content = 'Content 1'
        ad.save()
コード例 #7
0
ファイル: tests.py プロジェクト: bobfp/acme_ads
    def setUp(self):
        self.browser = webdriver.Firefox()
        self.browser.implicitly_wait(3)

        ad1 = Ad()
        ad1.name = 'Test Ad 1'
        ad1.content = 'Content 1'
        ad1.save()

        ad2 = Ad()
        ad2.name = 'Test Ad 2'
        ad2.content = 'Content 2'
        ad2.save()

        ad3 = Ad()
        ad3.name = 'Test Ad 3'
        ad3.content = 'Content 3'
        ad3.save()
コード例 #8
0
ファイル: tests.py プロジェクト: bcoop713/acme_ads
	def setUp(self):
		self.browser = webdriver.Firefox()
		self.browser.implicitly_wait(3)

		ad1 = Ad()
		ad1.name = 'Test Ad 1'
		ad1.content = 'Content 1'
		ad1.save()

		ad2 = Ad()
		ad2.name = 'Test Ad 2'
		ad2.content = 'Content 2'
		ad2.save()

		ad3 = Ad()
		ad3.name = 'Test Ad 3'
		ad3.content = 'Content 3'
		ad3.save()
コード例 #9
0
ファイル: test_views.py プロジェクト: bcoop713/acme_ads
	def setUp(self):
		newspaper1 = Newspaper(name='Test Newspaper 1')
		newspaper1.save()

		newspaper2 = Newspaper(name='Test Newspaper 2')
		newspaper2.save()

		ad = Ad()
		ad.name = 'Name 1'
		ad.content = 'Content 1'
		ad.save()
		ad.newspapers.add(newspaper1, newspaper2)
		ad.save()
コード例 #10
0
    def setUp(self):
        newspaper1 = Newspaper(name='Test Newspaper 1')
        newspaper1.save()

        newspaper2 = Newspaper(name='Test Newspaper 2')
        newspaper2.save()

        ad = Ad()
        ad.name = 'Name 1'
        ad.content = 'Content 1'
        ad.save()
        ad.newspapers.add(newspaper1, newspaper2)
        ad.save()
コード例 #11
0
ファイル: test_models.py プロジェクト: bcoop713/acme_ads
	def setUp(self):
		newspaper1 = Newspaper(name='Test Newspaper 1')
		newspaper1.save()

		newspaper2 = Newspaper(name='Test Newspaper 2')
		newspaper2.save()

		newspaper3 = Newspaper(name='Test Newspaper 3')
		newspaper3.save()

		first_ad = Ad()
		first_ad.name = 'Name 1'
		first_ad.content = 'Content 1'
		first_ad.save()
		first_ad.newspapers.add(newspaper1, newspaper2)
		first_ad.save()

		second_ad = Ad()
		second_ad.name = 'Name 2'
		second_ad.content = 'Content 2'
		second_ad.save()
		second_ad.newspapers.add(newspaper2, newspaper3)
		first_ad.save()
コード例 #12
0
ファイル: test_models.py プロジェクト: bobfp/acme_ads
    def setUp(self):
        newspaper1 = Newspaper(name='Test Newspaper 1')
        newspaper1.save()

        newspaper2 = Newspaper(name='Test Newspaper 2')
        newspaper2.save()

        newspaper3 = Newspaper(name='Test Newspaper 3')
        newspaper3.save()

        first_ad = Ad()
        first_ad.name = 'Name 1'
        first_ad.content = 'Content 1'
        first_ad.save()
        first_ad.newspapers.add(newspaper1, newspaper2)
        first_ad.save()

        second_ad = Ad()
        second_ad.name = 'Name 2'
        second_ad.content = 'Content 2'
        second_ad.save()
        second_ad.newspapers.add(newspaper2, newspaper3)
        first_ad.save()