server: Switch tests to pretty_assertions

This commit is contained in:
Valentin Tolmer
2023-09-10 22:15:07 +02:00
committed by nitnelave
parent 1598f096e9
commit 134796aa9f
13 changed files with 30 additions and 3 deletions

View File

@@ -211,9 +211,10 @@ pub trait BackendHandler:
#[cfg(test)]
mod tests {
use base64::Engine;
use super::*;
use base64::Engine;
use pretty_assertions::assert_ne;
#[test]
fn test_uuid_time() {
use chrono::prelude::*;

View File

@@ -32,6 +32,7 @@ pub mod tests {
infra::configuration::ConfigurationBuilder,
};
use lldap_auth::{opaque, registration};
use pretty_assertions::assert_eq;
use sea_orm::Database;
pub fn get_default_config() -> Configuration {

View File

@@ -154,6 +154,7 @@ impl GroupBackendHandler for SqlBackendHandler {
mod tests {
use super::*;
use crate::domain::{handler::SubStringFilter, sql_backend_handler::tests::*, types::UserId};
use pretty_assertions::assert_eq;
async fn get_group_ids(
handler: &SqlBackendHandler,

View File

@@ -51,6 +51,7 @@ mod tests {
use crate::domain::{
handler::AttributeList, sql_backend_handler::tests::*, types::AttributeType,
};
use pretty_assertions::assert_eq;
#[tokio::test]
async fn test_default_schema() {

View File

@@ -42,6 +42,7 @@ mod tests {
sql_migrations,
types::{GroupId, JpegPhoto, Serialized, Uuid},
};
use pretty_assertions::assert_eq;
use super::*;
use chrono::prelude::*;

View File

@@ -371,6 +371,7 @@ mod tests {
sql_backend_handler::tests::*,
types::{JpegPhoto, UserColumn},
};
use pretty_assertions::{assert_eq, assert_ne};
#[tokio::test]
async fn test_list_users_no_filter() {

View File

@@ -569,6 +569,7 @@ pub struct UserAndGroups {
#[cfg(test)]
mod tests {
use super::*;
use pretty_assertions::assert_eq;
#[test]
fn test_serialized_debug_string() {

View File

@@ -360,6 +360,7 @@ where
#[cfg(test)]
mod tests {
use super::*;
use pretty_assertions::assert_eq;
#[test]
fn check_generated_server_key() {

View File

@@ -508,6 +508,7 @@ mod tests {
RootNode, Variables,
};
use mockall::predicate::eq;
use pretty_assertions::assert_eq;
use std::collections::HashSet;
fn schema<'q, C, Q>(query_root: Q) -> RootNode<'q, Q, EmptyMutation<C>, EmptySubscription<C>>

View File

@@ -787,6 +787,7 @@ mod tests {
use chrono::TimeZone;
use ldap3_proto::proto::{LdapDerefAliases, LdapSearchScope, LdapSubstringFilter};
use mockall::predicate::eq;
use pretty_assertions::assert_eq;
use std::collections::HashSet;
use tokio;