Ejemplo n.º 1
0
 def test_fire(self):
     self.browser.visit(self.path)
     self.browser.css('button')[0].click()
     assert urlparse(self.browser.location).netloc == 'www.google.com'
Ejemplo n.º 2
0
 def test_location_set(self):
     self.browser.location = self.path
     for p in ('scheme', 'path'):
         getattr(urlparse(self.browser.visit(self.path).location), p) == \
             getattr(urlparse(self.path), p)
Ejemplo n.º 3
0
 def test_press_button(self):
     self.browser.visit(self.path)
     self.browser.pressButton('Search')
     assert urlparse(self.browser.location).netloc == 'www.google.com'
Ejemplo n.º 4
0
 def test_press_button(self):
     self.browser.visit(self.path)
     self.browser.pressButton('Search')
     assert urlparse(self.browser.location).path.endswith('/submit.html')
Ejemplo n.º 5
0
 def test_fire(self):
     self.browser.visit(self.path)
     self.browser.css('button')[0].click()
     assert urlparse(self.browser.location).path.endswith('/submit.html')
Ejemplo n.º 6
0
 def test_location_set(self):
     self.browser.location = self.path
     for p in ('scheme', 'path'):
         getattr(urlparse(self.browser.visit(self.path).location), p) == \
             getattr(urlparse(self.path), p)
Ejemplo n.º 7
0
 def test_location_set(self):
     url = self.base_url + 'location2'
     self.browser.location = url
     for p in ('scheme', 'path'):
         getattr(urlparse(self.browser.visit(url).location), p) == \
             getattr(urlparse(url), p)
Ejemplo n.º 8
0
 def test_location_get(self):
     for p in ('scheme', 'path'):
         getattr(urlparse(self.browser.location), p) == \
             getattr(urlparse(self.base_url), p)
Ejemplo n.º 9
0
 def test_location_set(self):
     self.browser.location = 'http://zombie.labnotes.org/'
     for p in ('scheme', 'path'):
         getattr(urlparse(self.browser.location), p) == \
             getattr(urlparse(self.path), p)
Ejemplo n.º 10
0
 def test_location_get(self):
     for p in ('scheme', 'path'):
         getattr(urlparse(self.browser.location), p) == \
             getattr(urlparse(self.path), p)