def test_anwendungszeitraum_bis_is_valid_from_date_or_keine_angabe(self): root1 = create(Builder('repository_root') .having(valid_from=date(2016, 6, 11))) model = Repository() model.obj = root1 self.assertEquals(date(2016, 6, 11), model.binding().anwendungszeitraum.von.datum.date()) root2 = create(Builder('repository_root') .having(valid_until=date(2016, 6, 11))) model = Repository() model.obj = root2 self.assertEquals('keine Angabe', model.binding().anwendungszeitraum.von.datum)
def test_anwendungszeitraum_bis_is_valid_from_date_or_keine_angabe(self): root1 = create( Builder('repository_root').having(valid_from=date(2016, 6, 11))) model = Repository() model.obj = root1 self.assertEquals(date(2016, 6, 11), model.binding().anwendungszeitraum.von.datum.date()) root2 = create( Builder('repository_root').having(valid_until=date(2016, 6, 11))) model = Repository() model.obj = root2 self.assertEquals('keine Angabe', model.binding().anwendungszeitraum.von.datum)
def test_name_is_root_title(self): root = create(Builder('repository_root').titled(u'Ordnungsystem 2001')) model = Repository() model.obj = root self.assertEquals(u'Ordnungsystem 2001', model.binding().name)
def test_name_is_root_title(self): root = create(Builder('repository_root').titled(u'Ordnungsystem 2001')) model = Repository() model.obj = root self.assertEquals(u'Ordnungsystem 2001', model.binding().name)
def test_anwendungszeitraum_von_is_valid_from_date_or_keine_angabe(self): self.login(self.regular_user) model = Repository() model.obj = self.repository_root self.repository_root.valid_until = date(2016, 7, 11) self.assertEquals(date(2016, 7, 11), model.binding().anwendungszeitraum.bis.datum.date()) self.assertEquals('keine Angabe', model.binding().anwendungszeitraum.von.datum) self.repository_root.valid_from = date(2016, 6, 11) self.assertEquals(date(2016, 6, 11), model.binding().anwendungszeitraum.von.datum.date())
def test_anwendungszeitraum_von_is_valid_from_date_or_keine_angabe(self): self.login(self.regular_user) model = Repository() model.obj = self.repository_root self.repository_root.valid_until = date(2016, 7, 11) self.assertEquals(date(2016, 7, 11), model.binding().anwendungszeitraum.bis.datum.date()) self.assertEquals('keine Angabe', model.binding().anwendungszeitraum.von.datum) self.repository_root.valid_from = date(2016, 6, 11) self.assertEquals(date(2016, 6, 11), model.binding().anwendungszeitraum.von.datum.date())
def test_name_is_root_title(self): self.login(self.regular_user) model = Repository() model.obj = self.repository_root self.assertEquals(self.repository_root.Title(), model.binding().name)
def test_name_is_root_title(self): self.login(self.regular_user) model = Repository() model.obj = self.repository_root self.assertEquals(self.repository_root.Title(), model.binding().name)