def test_saves_all_fields(self):
     line = version_0.status_line(5, "GOOD", "subdir_name",
                                  "test_name", "my reason here",
                                  {"key1": "value",
                                   "key2": "another value",
                                   "key3": "value3"})
     self.assertEquals(line.indent, 5)
     self.assertEquals(line.status, "GOOD")
     self.assertEquals(line.subdir, "subdir_name")
     self.assertEquals(line.testname, "test_name")
     self.assertEquals(line.reason, "my reason here")
     self.assertEquals(line.optional_fields,
                       {"key1": "value", "key2": "another value",
                        "key3": "value3"})
 def test_saves_all_fields(self):
     line = version_0.status_line(5, "GOOD", "subdir_name",
                                  "test_name", "my reason here",
                                  {"key1": "value",
                                   "key2": "another value",
                                   "key3": "value3"})
     self.assertEquals(line.indent, 5)
     self.assertEquals(line.status, "GOOD")
     self.assertEquals(line.subdir, "subdir_name")
     self.assertEquals(line.testname, "test_name")
     self.assertEquals(line.reason, "my reason here")
     self.assertEquals(line.optional_fields,
                       {"key1": "value", "key2": "another value",
                        "key3": "value3"})
 def test_parses_blank_testname(self):
     line = version_0.status_line(0, "GOOD", "subdir", "----",
                                  "", {})
     self.assertEquals(line.testname, None)
 def test_parses_blank_subdir(self):
     line = version_0.status_line(0, "GOOD", "----", "test",
                                  "", {})
     self.assertEquals(line.subdir, None)
 def test_handles_endstatus(self):
     for stat in self.statuses:
         line = version_0.status_line(0, "END " + stat, "----",
                                      "test", "", {})
         self.assertEquals(line.type, "END")
         self.assertEquals(line.status, stat)
 def test_handles_start(self):
     line = version_0.status_line(0, "START", "----", "test",
                                  "", {})
     self.assertEquals(line.type, "START")
     self.assertEquals(line.status, None)
Esempio n. 7
0
 def test_parses_blank_testname(self):
     line = version_0.status_line(0, "GOOD", "subdir", "----", "", {})
     self.assertEquals(line.testname, None)
Esempio n. 8
0
 def test_parses_blank_subdir(self):
     line = version_0.status_line(0, "GOOD", "----", "test", "", {})
     self.assertEquals(line.subdir, None)
Esempio n. 9
0
 def test_handles_endstatus(self):
     for stat in self.statuses:
         line = version_0.status_line(0, "END " + stat, "----", "test", "",
                                      {})
         self.assertEquals(line.type, "END")
         self.assertEquals(line.status, stat)
Esempio n. 10
0
 def test_handles_start(self):
     line = version_0.status_line(0, "START", "----", "test", "", {})
     self.assertEquals(line.type, "START")
     self.assertEquals(line.status, None)
Esempio n. 11
0
 def test_handles_status(self):
     for stat in self.statuses:
         line = version_0.status_line(0, stat, "----", "test", "", {})
         self.assertEqual(line.type, "STATUS")
         self.assertEqual(line.status, stat)