Exemplo n.º 1
0
 def test_front_matter_errors(self):
     # Unrecognized file extension
     self.assertEqual(utils.find_front_matter('boop', '.cake'), '')
     self.assertEqual(utils.parse_front_matter('boop', '.cake'), {})
Exemplo n.º 2
0
	def test_front_matter_errors(self):
		# Unrecognized file extension
		self.assertEqual(utils.find_front_matter('boop', '.cake'), '')
		self.assertEqual(utils.parse_front_matter('boop', '.cake'), {})
Exemplo n.º 3
0
 def _parse_fm_test(self, name):
     prefix, ext = os.path.splitext(name)
     actual = self.load_fixture(name)
     expected = json.loads(self.load_fixture('fm-parse-expected.json'))
     self.assertEqual(utils.parse_front_matter(actual, ext[1:]), expected)
Exemplo n.º 4
0
	def _parse_fm_test(self, name):
		prefix, ext = os.path.splitext(name)
		actual = self.load_fixture(name)
		expected = json.loads(self.load_fixture('fm-parse-expected.json'))
		self.assertEqual(utils.parse_front_matter(actual, ext[1:]), expected)