コード例 #1
0
 def test_disruption_phrase_4(self):
     line_status = api_helper.create_test_line_status(
         4, 'Entire line closed due to engineering works.')
     actual = speech._generate_disruption_phrase(line_status)
     self.assertEqual(
         actual,
         'There is a planned closure on the Piccadilly Line. Entire line closed due to engineering works.'
     )
コード例 #2
0
 def test_disruption_phrase_5(self):
     line_status = api_helper.create_test_line_status(
         5, 'No service between Rayners Lane and Uxbridge.')
     actual = speech._generate_disruption_phrase(line_status)
     self.assertEqual(
         actual,
         'There is a partial closure on the Piccadilly Line. No service between Rayners Lane and Uxbridge.'
     )
コード例 #3
0
 def test_disruption_phrase_7(self):
     line_status = api_helper.create_test_line_status(
         7, 'Reduced service due to a staff strike.')
     actual = speech._generate_disruption_phrase(line_status)
     self.assertEqual(
         actual,
         'The Piccadilly Line is running a reduced service. Reduced service due to a staff strike.'
     )
コード例 #4
0
 def test_disruption_phrase_3(self):
     line_status = api_helper.create_test_line_status(
         3, 'No service between Rayners Lane and Uxbridge.')
     actual = speech._generate_disruption_phrase(line_status)
     self.assertEqual(
         actual,
         'The Piccadilly Line is part suspended. No service between Rayners Lane and Uxbridge.'
     )
コード例 #5
0
 def test_disruption_phrase_0(self):
     line_status = api_helper.create_test_line_status(
         0, 'The service is special.')
     actual = speech._generate_disruption_phrase(line_status)
     self.assertEqual(
         actual,
         'The Piccadilly Line is running a special service. The service is special.'
     )
コード例 #6
0
 def test_disruption_phrase_6(self):
     line_status = api_helper.create_test_line_status(
         6, 'Severe delays between Rayners Lane and Uxbridge.')
     actual = speech._generate_disruption_phrase(line_status)
     self.assertEqual(
         actual,
         'There is disruption on the Piccadilly Line. Severe delays between Rayners Lane and Uxbridge.'
     )
コード例 #7
0
 def test_disruption_phrase_2(self):
     line_status = api_helper.create_test_line_status(2, None)
     actual = speech._generate_disruption_phrase(line_status)
     self.assertEqual(actual, 'The Piccadilly Line is suspended.')
コード例 #8
0
 def test_disruption_phrase_19(self):
     line_status = api_helper.create_test_line_status(19, None)
     actual = speech._generate_disruption_phrase(line_status)
     self.assertEqual(actual, 'Information about the Piccadilly Line.')
コード例 #9
0
 def test_disruption_phrase_18(self):
     line_status = api_helper.create_test_line_status(18, None)
     actual = speech._generate_disruption_phrase(line_status)
     self.assertEqual(actual, 'There are no issues on the Piccadilly Line.')
コード例 #10
0
 def test_disruption_phrase_16(self):
     line_status = api_helper.create_test_line_status(16, None)
     actual = speech._generate_disruption_phrase(line_status)
     self.assertEqual(actual, 'The Piccadilly Line is not running.')
コード例 #11
0
 def test_disruption_phrase_15(self):
     line_status = api_helper.create_test_line_status(15, None)
     actual = speech._generate_disruption_phrase(line_status)
     self.assertEqual(actual, 'The Piccadilly Line is being diverted.')
コード例 #12
0
 def test_disruption_phrase_14(self):
     line_status = api_helper.create_test_line_status(14, None)
     actual = speech._generate_disruption_phrase(line_status)
     self.assertEqual(
         actual, 'There is a change of frequency on the Piccadilly Line.')
コード例 #13
0
 def test_disruption_phrase_13(self):
     line_status = api_helper.create_test_line_status(13, None)
     actual = speech._generate_disruption_phrase(line_status)
     self.assertEqual(actual,
                      'The Piccadilly Line has no step free access.')
コード例 #14
0
 def test_disruption_phrase_10(self):
     # I don't know if that's the right thing to do
     line_status = api_helper.create_test_line_status(10, None)
     actual = speech._generate_disruption_phrase(line_status)
     self.assertIsNone(actual)
コード例 #15
0
 def test_disruption_phrase_8(self):
     line_status = api_helper.create_test_line_status(8, None)
     actual = speech._generate_disruption_phrase(line_status)
     self.assertEqual(actual,
                      'The Piccadilly Line is operating as a bus service.')