def test_create_update_delete_sender(self, testappcfg):
        """ Test create sender on Odoo """

        test_sender_name = "Ned Flanders"

        conn = Connection(testappcfg.config)
        sender = Sender(None, test_sender_name)
        sender_id = create_partner(conn, sender)

        assert sender_id is not None
        assert sender_id > 0

        persistent = get_partner(conn, sender_id)
        assert persistent is not None
        assert persistent.id is not None
        assert persistent.name is not None

        persistent.name = "Maud Flanders"
        assert update_partner(conn, persistent) is True
        assert len(search_partners(conn, persistent.name)) > 0

        assert delete_partner(conn, persistent.id) is True
Exemple #2
0
    def test_create_update_delete_sender(self, testappcfg):
        """ Test create sender on Odoo """

        test_sender_name = "Ned Flanders"

        conn = Connection(testappcfg.config)
        sender = Sender(None, test_sender_name)
        sender_id = create_partner(conn, sender)

        assert sender_id is not None
        assert sender_id > 0

        persistent = get_partner(conn, sender_id)
        assert persistent is not None
        assert persistent.id is not None
        assert persistent.name is not None

        persistent.name = "Maud Flanders"
        assert update_partner(conn, persistent) is True
        assert len(search_partners(conn, persistent.name)) > 0

        assert delete_partner(conn, persistent.id) is True
    def test_search_partner_fail(self, testappcfg):
        """ Test failed search partner on Odoo """

        conn = Connection(testappcfg.config)

        assert len(search_partners(conn, "Kingslayer Inc")) == 0
Exemple #4
0
    def test_search_partner_fail(self, testappcfg):
        """ Test failed search partner on Odoo """

        conn = Connection(testappcfg.config)

        assert len(search_partners(conn, "Kingslayer Inc")) == 0