Did I find the right examples for you? yes no

All Samples(116)  |  Call(116)  |  Derive(0)  |  Import(0)

src/m/o/modoboa-1.1.1/modoboa/extensions/admin/tests/import_.py   modoboa(Download)
        admin = User.objects.get(username="admin")
        dom = Domain.objects.get(name="domain1.com")
        self.assertEqual(dom.quota, 100)
        self.assertTrue(dom.enabled)
        self.assertTrue(admin.is_owner(dom))
        domalias = DomainAlias.objects.get(name="domalias1.com")
        self.assertEqual(domalias.target, dom)
        self.assertTrue(admin.is_owner(domalias))
        dom = Domain.objects.get(name="domain2.com")
        self.assertEqual(dom.quota, 200)
        self.assertFalse(dom.enabled)
        self.assertTrue(admin.is_owner(dom))
        mb1 = u1.mailbox_set.all()[0]
        self.assertTrue(admin.is_owner(u1))
        self.assertEqual(u1.email, "user1@test.com")
        self.assertEqual(u1.first_name, "User")
        self.assertEqual(u1.last_name, "One")

src/m/o/modoboa-HEAD/modoboa/extensions/admin/tests/import_.py   modoboa(Download)
        admin = User.objects.get(username="admin")
        dom = Domain.objects.get(name="domain1.com")
        self.assertEqual(dom.quota, 100)
        self.assertTrue(dom.enabled)
        self.assertTrue(admin.is_owner(dom))
        domalias = DomainAlias.objects.get(name="domalias1.com")
        self.assertEqual(domalias.target, dom)
        self.assertTrue(admin.is_owner(domalias))
        dom = Domain.objects.get(name="domain2.com")
        self.assertEqual(dom.quota, 200)
        self.assertFalse(dom.enabled)
        self.assertTrue(admin.is_owner(dom))
        mb1 = u1.mailbox_set.all()[0]
        self.assertTrue(admin.is_owner(u1))
        self.assertEqual(u1.email, "user1@test.com")
        self.assertEqual(u1.first_name, "User")
        self.assertEqual(u1.last_name, "One")

src/m/o/modoboa-1.1.1/modoboa/extensions/admin/tests/account.py   modoboa(Download)
        account = User.objects.get(username="tester@test.com")
        mb = account.mailbox_set.all()[0]
        self.assertEqual(mb.full_address, "tester@test.com")
        self.assertEqual(mb.quota, 10)
        self.assertEqual(mb.enabled, True)
        self.assertEqual(mb.quota_value.username, "tester@test.com")
        self.assertEqual(account.username, mb.full_address)

src/m/o/modoboa-HEAD/modoboa/extensions/admin/tests/account.py   modoboa(Download)
        account = User.objects.get(username="tester@test.com")
        mb = account.mailbox_set.all()[0]
        self.assertEqual(mb.full_address, "tester@test.com")
        self.assertEqual(mb.quota, 10)
        self.assertEqual(mb.enabled, True)
        self.assertEqual(mb.quota_value.username, "tester@test.com")
        self.assertEqual(account.username, mb.full_address)

src/m/o/modoboa-1.1.1/modoboa/extensions/admin/tests/domain.py   modoboa(Download)
        self.ajax_post(reverse("modoboa.extensions.admin.views.domain.newdomain"), values)
        dom = Domain.objects.get(name="pouet.com")
        self.assertEqual(dom.name, "pouet.com")
        self.assertEqual(dom.quota, 100)
        self.assertEqual(dom.enabled, False)
        )
        dom = Domain.objects.get(name="pouet.com")
        self.assertEqual(dom.quota, 50)
        da = User.objects.get(username="toto@pouet.com")
        self.assertEqual(da.mailbox_set.all()[0].quota, 50)

src/m/o/modoboa-1.1.1/modoboa/extensions/admin/tests/alias.py   modoboa(Download)
            values
        )
        self.assertEqual(user.mailbox_set.all()[0].alias_set.count(), 2)
 
        del values["aliases_1"]
            values
        )
        self.assertEqual(user.mailbox_set.all()[0].alias_set.count(), 1)
 
    def test_dlist(self):
        )
        user = User.objects.get(username="user@test.com")
        self.assertEqual(user.mailbox_set.all()[0].alias_set.count(), 2)
        admin = User.objects.get(username="admin@test.com")
        self.assertEqual(admin.mailbox_set.all()[0].alias_set.count(), 1)
 
        dlist = Alias.objects.get(address="all", domain__name="test.com")
        self.assertEqual(len(dlist.get_recipients()), 3)

src/m/o/modoboa-HEAD/modoboa/extensions/admin/tests/domain.py   modoboa(Download)
        self.ajax_post(reverse("modoboa.extensions.admin.views.domain.newdomain"), values)
        dom = Domain.objects.get(name="pouet.com")
        self.assertEqual(dom.name, "pouet.com")
        self.assertEqual(dom.quota, 100)
        self.assertEqual(dom.enabled, False)
        )
        dom = Domain.objects.get(name="pouet.com")
        self.assertEqual(dom.quota, 50)
        da = User.objects.get(username="toto@pouet.com")
        self.assertEqual(da.mailbox_set.all()[0].quota, 50)

src/m/o/modoboa-HEAD/modoboa/extensions/admin/tests/alias.py   modoboa(Download)
            values
        )
        self.assertEqual(user.mailbox_set.all()[0].alias_set.count(), 2)
 
        del values["aliases_1"]
            values
        )
        self.assertEqual(user.mailbox_set.all()[0].alias_set.count(), 1)
 
    def test_dlist(self):
        )
        user = User.objects.get(username="user@test.com")
        self.assertEqual(user.mailbox_set.all()[0].alias_set.count(), 2)
        admin = User.objects.get(username="admin@test.com")
        self.assertEqual(admin.mailbox_set.all()[0].alias_set.count(), 1)
 
        dlist = Alias.objects.get(address="all", domain__name="test.com")
        self.assertEqual(len(dlist.get_recipients()), 3)

src/m/o/modoboa-1.1.1/modoboa/core/tests.py   modoboa(Download)
 
        self.assertEqual(
            self.clt.login(username="admin", password="titi"), True
        )
        self.assertEqual(
            self.clt.login(username="user@test.com", password="toto"), True

src/m/o/modoboa-HEAD/modoboa/core/tests.py   modoboa(Download)
 
        self.assertEqual(
            self.clt.login(username="admin", password="titi"), True
        )
        self.assertEqual(
            self.clt.login(username="user@test.com", password="toto"), True

  1 | 2  Next