mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 16:10:26 +00:00
update test
This commit is contained in:
@@ -1,20 +1,24 @@
|
||||
|
||||
import os
|
||||
import pytest
|
||||
from django.core.urlresolvers import reverse
|
||||
|
||||
from seahub.test_utils import BaseTestCase
|
||||
from seahub_extra.two_factor import devices_for_user
|
||||
from seahub_extra.two_factor.models import (StaticDevice, TOTPDevice,
|
||||
PhoneDevice)
|
||||
|
||||
TRAVIS = 'TRAVIS' in os.environ
|
||||
|
||||
|
||||
@pytest.mark.skipif(TRAVIS, reason="")
|
||||
class TwoFactorAuthViewTest(BaseTestCase):
|
||||
def setUp(self):
|
||||
self.login_as(self.admin)
|
||||
|
||||
def test_can_disable_two_factor_auth(self):
|
||||
from seahub_extra.two_factor.models import (StaticDevice, TOTPDevice,
|
||||
PhoneDevice)
|
||||
totp = TOTPDevice(user=self.admin, name="", confirmed=1)
|
||||
totp.save()
|
||||
|
||||
from seahub_extra.two_factor import devices_for_user
|
||||
devices = devices_for_user(self.admin)
|
||||
i = 0
|
||||
for device in devices_for_user(self.admin):
|
||||
|
Reference in New Issue
Block a user