Пример #1
0
    def _extract_timestamps(self, raw_html):
        """Wrapper around extract_time_v0 and extract_time_v1."""

        if self.trac_version >= (1, 0):
            return text.extract_timestamps_v1(raw_html)
        else:
            return text.extract_timestamps_v0(raw_html)
Пример #2
0
    def _extract_timestamps(self, raw_html):
        """Wrapper around extract_time_v0 and extract_time_v1."""

        if self.trac_version >= (1, 0):
            return text.extract_timestamps_v1(raw_html)
        else:
            return text.extract_timestamps_v0(raw_html)
Пример #3
0
 def test_extract_timestamps_multiple(self):
     raw_html = """dewqwlkjhew
     <input name="ts" value="654321" /> stuff
     <input name="ts" value="123123" /> stuff"""
     timestamps = text.extract_timestamps_v0(raw_html)
     self.assertEquals(timestamps["ts"], "654321")
Пример #4
0
 def test_extract_timestamps_multiple(self):
     raw_html = """dewqwlkjhew
     <input name="ts" value="654321" /> stuff
     <input name="ts" value="123123" /> stuff"""
     timestamps = text.extract_timestamps_v0(raw_html)
     self.assertEquals(timestamps["ts"], "654321")