Exemplo n.º 1
0
    def test_all(self):
        memacs = RssMemacs(argv=self.argv.split())
        data = memacs.test_get_entries()

        self.assertEqual(
            data[0],
            (
                "** <2009-09-06 Sun 16:45> "
                "[[http://www.wikipedia.org/][Example entry]]"
            )
        )
        self.assertEqual(
            data[1],
            "   Here is some text containing an interesting description."
        )
        self.assertEqual(
            data[3],
            "   :GUID:       unique string per item")
        self.assertEqual(
            data[4],
            '   :PUBLISHED:  Mon, 06 Sep 2009 16:45:00 +0000'
        )
        self.assertEqual(
            data[5],
            "   :ID:         a0df7d405a7e9822fdd86af04e162663f1dccf11"
        )

        self.assertEqual(data[2], "   :PROPERTIES:")
        self.assertEqual(data[6], "   :END:")
Exemplo n.º 2
0
    def test_all(self):
        memacs = RssMemacs(argv=self.argv.split())
        data = memacs.test_get_entries()

        # omit the hour from the result because this depends on the current locals:
        self.assertTrue(data[0].startswith('** <2009-09-06 Sun '))
        self.assertTrue(data[0].endswith(':45> [[http://www.wikipedia.org/][Example entry]]'))

        self.assertEqual(
            data[2],
            "   :GUID:       unique string per item")
        self.assertEqual(
            data[3],
            '   :PUBLISHED:  Mon, 06 Sep 2009 16:45:00 +0000'
        )
        self.assertEqual(
            data[4],
            "   :ID:         a0df7d405a7e9822fdd86af04e162663f1dccf11"
        )
        self.assertEqual(
            data[6],
            "   Here is some text containing an interesting description."
        )

        self.assertEqual(data[1], "   :PROPERTIES:")
        self.assertEqual(data[5], "   :END:")
Exemplo n.º 3
0
    def test_all(self):
        memacs = RssMemacs(argv=self.argv.split())
        data = memacs.test_get_entries()

        self.assertEqual(data[0],
                         ("** <2009-09-06 Sun 16:45> "
                          "[[http://www.wikipedia.org/][Example entry]]"))
        self.assertEqual(
            data[1],
            "   Here is some text containing an interesting description.")
        self.assertEqual(data[3], "   :GUID:       unique string per item")
        self.assertEqual(data[4],
                         '   :PUBLISHED:  Mon, 06 Sep 2009 16:45:00 +0000')
        self.assertEqual(
            data[5],
            "   :ID:         a0df7d405a7e9822fdd86af04e162663f1dccf11")

        self.assertEqual(data[2], "   :PROPERTIES:")
        self.assertEqual(data[6], "   :END:")
Exemplo n.º 4
0
    def test_all(self):
        memacs = RssMemacs(argv=self.argv.split())
        data = memacs.test_get_entries()

        # generate assertEquals :)
        #for d in range(len(data)):
        #    print "self.assertEqual(\n\tdata[%d],\n\t\"%s\")" % \
        #        (d, data[d])
        self.assertEqual(
            data[0],
            "** <2009-09-06 Sun 16:45> [[http://www.wikipedia.or" + \
            "g/][Example entry]]")
        self.assertEqual(
            data[1],
            "   Here is some text containing an interesting description.")
        self.assertEqual(data[2], "   :PROPERTIES:")
        self.assertEqual(data[3], "   :GUID:       unique string per item")
        self.assertEqual(
            data[4],
            "   :ID:         7ec7b2ec7d1ac5f18188352551b04f061af81e04")
        self.assertEqual(data[5], "   :END:")
Exemplo n.º 5
0
    def test_all(self):
        memacs = RssMemacs(argv=self.argv.split())
        data = memacs.test_get_entries()

        # omit the hour from the result because this depends on the current locals:
        self.assertTrue(data[0].startswith('** <2009-09-06 Sun '))
        self.assertTrue(data[0].endswith(
            ':45> [[http://www.wikipedia.org/][Example entry]]'))

        self.assertEqual(data[2], "   :GUID:       unique string per item")
        self.assertEqual(data[3],
                         '   :PUBLISHED:  Mon, 06 Sep 2009 16:45:00 +0000')
        self.assertEqual(
            data[4],
            "   :ID:         a0df7d405a7e9822fdd86af04e162663f1dccf11")
        self.assertEqual(
            data[6],
            "   Here is some text containing an interesting description.")

        self.assertEqual(data[1], "   :PROPERTIES:")
        self.assertEqual(data[5], "   :END:")
Exemplo n.º 6
0
 def test_false_appending(self):
     try:
         memacs = RssMemacs(argv=self.argv.split())
         memacs.test_get_entries()
     except Exception:
         pass
Exemplo n.º 7
0
 def test_false_appending(self):
     try:
         memacs = RssMemacs(argv=self.argv.split())
         memacs.test_get_entries()
     except Exception:
         pass