mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] User import unit test
This commit is contained in:
parent
fd06430e8f
commit
57dcf45a7c
2 changed files with 4 additions and 2 deletions
|
@ -32,6 +32,7 @@ import psutil
|
|||
|
||||
from datetime import datetime, timedelta
|
||||
from logging import FileHandler, getLogger, Formatter
|
||||
from io import IOBase
|
||||
|
||||
from moulinette import m18n, msettings
|
||||
from moulinette.core import MoulinetteError
|
||||
|
@ -374,6 +375,8 @@ def is_unit_operation(
|
|||
for field, value in context.items():
|
||||
if isinstance(value, file):
|
||||
context[field] = value.name
|
||||
elif isinstance(value, IOBase):
|
||||
context[field] = 'IOBase'
|
||||
operation_logger = OperationLogger(op_key, related_to, args=context)
|
||||
|
||||
try:
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import pytest
|
||||
|
||||
<<<<<<< HEAD
|
||||
from .conftest import message, raiseYunohostError
|
||||
|
||||
from yunohost.user import (
|
||||
|
@ -27,7 +26,7 @@ maindomain = ""
|
|||
|
||||
def clean_user_groups():
|
||||
for u in user_list()["users"]:
|
||||
user_delete(u)
|
||||
user_delete(u, purge=True)
|
||||
|
||||
for g in user_group_list()["groups"]:
|
||||
if g not in ["all_users", "visitors"]:
|
||||
|
|
Loading…
Add table
Reference in a new issue