Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
 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)
Ejemplo n.º 4
0
 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)
Ejemplo n.º 5
0
 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)
Ejemplo n.º 6
0
 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)