Ejemplo n.º 1
0
	def test_chamber(self):
		extention_content = cr_parser.parse_to_string('test/test_files/boiler_plate/CREC-2014-01-28-pt1-PgE123-4.txt', logdir="test/test_output", outdir="test/test_output")
		extention_content = str(extention_content)

		self.assertTrue("<chamber>Extensions</chamber>" in extention_content)
		self.assertTrue("<chamber>House</chamber>" in bolier_house_content)
		self.assertTrue("<chamber>Senate</chamber>" in bolier_senate_content)
Ejemplo n.º 2
0
    def test_recorder(self):
        content = cr_parser.parse_to_string("test/test_files/names/CREC-2013-01-23-pt1-PgH225-7.txt",
                                            logdir="test/test_output", outdir="test/test_output")
        content = str(content)
        speaker = len(re.findall("<recorder>", content))

        self.assertEqual(speaker, 1)
Ejemplo n.º 3
0
	def test_presiding(self):
		content = cr_parser.parse_to_string("test/test_files/names/CREC-2013-01-23-pt1-PgS226-5.txt", logdir="test/test_output", outdir="test/test_output")
		content = str(content)
		speaker = len(re.findall('<speaker name="The PRESIDING OFFICER">', content))
		speaking = len(re.findall('<speaking name="The PRESIDING OFFICER">', content))

		self.assertEqual(speaker, 2)
		self.assertEqual(speaking, 3)
Ejemplo n.º 4
0
	def test_acting_protemp(self):
		content = cr_parser.parse_to_string("test/test_files/names/CREC-2013-01-23-pt1-PgS189-5.txt", logdir="test/test_output", outdir="test/test_output")
		content = str(content)
		speaker = len(re.findall('<speaker name="The ACTING PRESIDENT pro tempore">', content))
		speaking = len(re.findall('<speaking name="The ACTING PRESIDENT pro tempore">', content))

		self.assertEqual(speaker, 1)
		self.assertEqual(speaking, 1)
Ejemplo n.º 5
0
	def test_protempore(self):
		content = cr_parser.parse_to_string("test/test_files/names/CREC-2013-01-23-pt1-PgH251-2.txt", logdir="test/test_output", outdir="test/test_output")
		content = str(content)
		speaker = len(re.findall('<speaker name="The SPEAKER pro tempore">', content))
		speaking = len(re.findall('<speaking name="The SPEAKER pro tempore">', content))

		self.assertEqual(speaker, 1)
		self.assertEqual(speaking, 3)
Ejemplo n.º 6
0
	def test_with_state(self):
		content = cr_parser.parse_to_string("test/test_files/names/CREC-2013-01-23-pt1-PgE53-4.txt", logdir="test/test_output", outdir="test/test_output")
		content = str(content)
		speaker = len(re.findall('<speaker name="Ms. SEWELL of Alabama">', content))
		speaking = len(re.findall('<speaking name="Ms. SEWELL of Alabama">', content))

		self.assertEqual(speaker, 1)
		self.assertEqual(speaking, 7)
Ejemplo n.º 7
0
	def test_mrs(self):
		content = cr_parser.parse_to_string("test/test_files/names/CREC-2013-01-23-pt1-PgE53.txt", logdir="test/test_output", outdir="test/test_output")
		content = str(content)
		speaker = len(re.findall('<speaker name="Mrs. BUSTOS">', content))
		speaking = len(re.findall('<speaking name="Mrs. BUSTOS">', content))

		self.assertEqual(speaker, 1)
		self.assertEqual(speaking, 4)
Ejemplo n.º 8
0
	def test_excutive(self):
		content = cr_parser.parse_to_string("test/test_files/SOTU/CREC-2014-01-28-pt1-PgH1473-5.txt", logdir="test/test_output", outdir="test/test_output")
		content = str(content)
		vpspeaker = len(re.findall('<speaker name="The VICE PRESIDENT"', content))
		vpspeaking = len(re.findall('<speaking name="The VICE PRESIDENT"', content))
		speaker = len(re.findall('<speaker name="The PRESIDENT"', content))
		speaking = len(re.findall('<speaking name="The PRESIDENT"', content))

		self.assertEqual(vpspeaker, 1)
		# the VP count is off
		# self.assertEqual(vpspeaking, 22)
		self.assertEqual(speaker, 1)
		self.assertEqual(speaking, 105)
Ejemplo n.º 9
0
def bolier_house_content():
    house_content = cr_parser.parse_to_string("test/test_files/boiler_plate/CREC-2014-01-28-pt1-PgH1433-2.txt",
                                              logdir="test/test_output", outdir="test/test_output")
    return str(house_content)
Ejemplo n.º 10
0
    def test_block_quote(self):
        content = cr_parser.parse_to_string('test/test_files/common_tags/CREC-2013-01-23-pt1-PgE58-3.txt',
                                            logdir="test/test_output", outdir="test/test_output")
        content = str(content)

        self.assertTrue('<speaking quote="true" speaker="Mr. SABLAN">' in content)
Ejemplo n.º 11
0
def bolier_house_content():
	house_content = cr_parser.parse_to_string("test/test_files/boiler_plate/CREC-2014-01-28-pt1-PgH1433-2.txt", logdir="test/test_output", outdir="test/test_output")
	return str(house_content)
Ejemplo n.º 12
0
	def test_block_quote(self):
		content = cr_parser.parse_to_string('test/test_files/common_tags/CREC-2013-01-23-pt1-PgE58-3.txt', logdir="test/test_output", outdir="test/test_output")
		content = str(content)

		self.assertTrue('<speaking quote="true" speaker="Mr. SABLAN">' in content)
Ejemplo n.º 13
0
	def test_recorder(self):
		content = cr_parser.parse_to_string("test/test_files/names/CREC-2013-01-23-pt1-PgH225-7.txt", logdir="test/test_output", outdir="test/test_output")
		content = str(content)
		speaker = len(re.findall("<recorder>", content))

		self.assertEqual(speaker, 1)