1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-12-01 02:54:36 +01:00

update tests

This commit is contained in:
Nikolay Kim 2018-12-06 15:03:01 -08:00
parent e9121025b7
commit 9f4d48f7a1
7 changed files with 17 additions and 15 deletions

View File

@ -197,10 +197,10 @@ mod tests {
use tokio_io::{AsyncRead, AsyncWrite}; use tokio_io::{AsyncRead, AsyncWrite};
use super::*; use super::*;
use error::ParseError; use crate::error::ParseError;
use h1::Message; use crate::h1::Message;
use httpmessage::HttpMessage; use crate::httpmessage::HttpMessage;
use request::Request; use crate::request::Request;
#[test] #[test]
fn test_http_request_chunked_payload_and_next_message() { fn test_http_request_chunked_payload_and_next_message() {

View File

@ -612,9 +612,9 @@ mod tests {
use tokio_io::{AsyncRead, AsyncWrite}; use tokio_io::{AsyncRead, AsyncWrite};
use super::*; use super::*;
use error::ParseError; use crate::error::ParseError;
use httpmessage::HttpMessage; use crate::httpmessage::HttpMessage;
use message::Head; use crate::message::Head;
impl PayloadType { impl PayloadType {
fn unwrap(self) -> PayloadDecoder { fn unwrap(self) -> PayloadDecoder {

View File

@ -73,9 +73,9 @@ impl Response {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use body::Body; use crate::body::Body;
use crate::response::Response;
use http::StatusCode; use http::StatusCode;
use response::Response;
#[test] #[test]
fn test_build() { fn test_build() {

View File

@ -568,11 +568,12 @@ where
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
use crate::test::TestRequest;
use encoding::all::ISO_8859_2; use encoding::all::ISO_8859_2;
use encoding::Encoding; use encoding::Encoding;
use futures::Async; use futures::Async;
use mime; use mime;
use test::TestRequest; use serde_derive::Deserialize;
#[test] #[test]
fn test_content_type() { fn test_content_type() {

View File

@ -137,8 +137,9 @@ mod tests {
use bytes::Bytes; use bytes::Bytes;
use futures::Async; use futures::Async;
use http::header; use http::header;
use serde_derive::{Deserialize, Serialize};
use test::TestRequest; use crate::test::TestRequest;
impl PartialEq for JsonPayloadError { impl PartialEq for JsonPayloadError {
fn eq(&self, other: &JsonPayloadError) -> bool { fn eq(&self, other: &JsonPayloadError) -> bool {

View File

@ -855,9 +855,9 @@ impl ResponsePool {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
use body::Body; use crate::body::Body;
use http; use crate::http;
use http::header::{HeaderValue, CONTENT_TYPE, COOKIE}; use crate::http::header::{HeaderValue, CONTENT_TYPE, COOKIE};
// use test::TestRequest; // use test::TestRequest;

View File

@ -194,8 +194,8 @@ pub fn handshake_response(req: &Request) -> ResponseBuilder {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
use crate::test::TestRequest;
use http::{header, Method}; use http::{header, Method};
use test::TestRequest;
#[test] #[test]
fn test_handshake() { fn test_handshake() {