def test_when_change_url_descripcion_remains_the_same(self): webclient = MockWebClient(HTMLFactory.navigation_url()) self.factory = AsuntoFactory(webclient) self.factory.urlobject = URL("Url", "Desc") self.factory.changeUrl("yyy") thread = ThreadModel(self.factory.create(self.fragment)) self.assertEqual(thread.location(), u'Desc')
def test_location_is_empty_when_no_Urlobject_is_given(self): thread = ThreadModel(self.factory.create(self.fragment)) self.assertEqual(thread.location(), "")
def test_location(self): self.factory.urlobject = URL("Url", "Desc") thread = ThreadModel(self.factory.create(self.fragment)) self.assertEqual(thread.location(), u'Desc')