Ejemplo n.º 1
0
    def test_from_ip_without_account_anonymous(self):
        for ip in self.fixtures_pg[IP]:
            if ip.account:
                continue

            with self.subTest(ip=ip.ip):
                self.assertIsInstance(User.from_ip(ip.ip), AnonymousUserMixin)
Ejemplo n.º 2
0
    def test_from_ip_without_account_anonymous(self):
        for ip in self.fixtures_pg[IP]:
            if ip.account:
                continue

            with self.subTest(ip=ip.ip):
                self.assertIsInstance(User.from_ip(ip.ip), AnonymousUserMixin)
Ejemplo n.º 3
0
 def test_from_ip_correct_user(self):
     for ip in self.fixtures_pg[IP]:
         if not ip.account:
             continue
         with self.subTest(ip=ip.ip):
             self.assertEqual(User.get(ip.account), User.from_ip(ip.ip))
Ejemplo n.º 4
0
 def test_from_ip_correct_user(self):
     for ip in self.fixtures_pg[IP]:
         if not ip.account:
             continue
         with self.subTest(ip=ip.ip):
             self.assertEqual(User.get(ip.account), User.from_ip(ip.ip))