def test_delivered_default(self): data = {"parents": ["Alice", "Bob"], "delivered": "October 1st, 2015"} self._set_data(data) b = Baby(self.url) out = b._announce() expected = '' self.assertEqual(out, expected)
def test_announce_due_date(self): data = {"parents": ["Alice", "Bob"], "due_date": "January 1st, 2015"} self._set_data(data) b = Baby(self.url) out = b._announce() expected = 'Alice and Bob are excited to announce ' \ 'the impending arrival of a baby, due on January 1st, 2015' self.assertEqual(out, expected)
def test_announce_name(self): data = {"parents": ["Alice", "Bob"], "name": "Claire"} self._set_data(data) b = Baby(self.url) out = b._announce() expected = 'Alice and Bob are excited to announce ' \ 'the impending arrival of a baby, Claire' self.assertEqual(out, expected)
def test_announce_default(self): data = {"parents": ["Alice", "Bob"]} self._set_data(data) b = Baby(self.url) out = b._announce() expected = 'Alice and Bob are excited to announce ' \ 'the impending arrival of a baby' self.assertEqual(out, expected)
def test_delivered_default(self): data = {"parents": ["Alice", "Bob"], "delivered": "October 1st, 2015"} self._set_data(data) b = Baby(self.url) out = b._announce() expected = '' self.assertEqual(out, expected)
def test_announce_due_date(self): data = {"parents": ["Alice", "Bob"], "due_date": "January 1st, 2015"} self._set_data(data) b = Baby(self.url) out = b._announce() expected = 'Alice and Bob are excited to announce ' \ 'the impending arrival of a baby, due on January 1st, 2015' self.assertEqual(out, expected)