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)
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()
def setUp(self): newspaper1 = Newspaper(name='Test Newspaper 1') newspaper1.save() ad = Ad() ad.name = 'Name 1' ad.content = 'Content 1' ad.save()
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()
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()
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()