Ejemplo n.º 1
0
    def test_simple_resolve(self):
        forward = Forward()
        forward.domain_id = 2
        forward.source = '*****@*****.**'
        forward.destination = '*****@*****.**'
        self.db.add(forward)
        self.db.commit()

        update_resolved_forwards(self.db, forward.source)

        resolved = self.db.query(ResolvedForward).filter_by(
            source=forward.source).first()
        self.assertEqual(resolved.destination, '*****@*****.**')
Ejemplo n.º 2
0
    def test_simple_resolve(self):
        forward = Forward()
        forward.domain_id = 2
        forward.source = '*****@*****.**'
        forward.destination = '*****@*****.**'
        self.db.add(forward)
        self.db.commit()

        update_resolved_forwards(self.db, forward.source)

        resolved = self.db.query(ResolvedForward
            ).filter_by(source=forward.source
            ).first()
        self.assertEqual(resolved.destination, '*****@*****.**')
Ejemplo n.º 3
0
    def test_simple(self):
        forward = Forward()
        forward.domain_id = 2
        forward.source = '*****@*****.**'
        forward.destination = '*****@*****.**'
        self.db.add(forward)
        self.db.commit()

        update_forwardings(self.db, forward.source, forward.domain_id)

        forwards = self.db.query(Forwards).filter_by(
            source=forward.source).one()

        self.assertEqual(forwards.destination,
                         '[email protected],[email protected]')
Ejemplo n.º 4
0
    def test_simple(self):
        forward = Forward()
        forward.domain_id = 2
        forward.source = '*****@*****.**'
        forward.destination = '*****@*****.**'
        self.db.add(forward)
        self.db.commit()

        update_forwardings(self.db, forward.source, forward.domain_id)

        forwards = self.db.query(Forwards
            ).filter_by(source=forward.source
            ).one()

        self.assertEqual(forwards.destination,
                         '[email protected],[email protected]')
Ejemplo n.º 5
0
    def test_complex_resolve(self):
        forward = Forward()
        forward.domain_id = 1
        forward.source = '*****@*****.**'
        forward.destination = '*****@*****.**'
        self.db.add(forward)
        self.db.commit()

        update_resolved_forwards(self.db, forward.source)

        resolved = []
        for forward in self.db.query(ResolvedForward
                ).filter_by(source=forward.source):
            resolved.append(forward.destination)

        self.assertEqual(resolved, ['*****@*****.**', '*****@*****.**'])
Ejemplo n.º 6
0
    def test_complex_resolve(self):
        forward = Forward()
        forward.domain_id = 1
        forward.source = '*****@*****.**'
        forward.destination = '*****@*****.**'
        self.db.add(forward)
        self.db.commit()

        update_resolved_forwards(self.db, forward.source)

        resolved = []
        for forward in self.db.query(ResolvedForward).filter_by(
                source=forward.source):
            resolved.append(forward.destination)

        self.assertEqual(resolved,
                         ['*****@*****.**', '*****@*****.**'])