From d175a6f7ab9dd53e36f9f52769ac02dbfdc57e3e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 19 Nov 2018 17:08:18 +0100 Subject: Cleanup tests imports --- server/tests/api/activitypub/security.ts | 3 ++- server/tests/api/users/index.ts | 2 +- server/tests/api/videos/video-blacklist-management.ts | 3 +-- server/tests/api/videos/video-channels.ts | 6 ++++-- server/tests/api/videos/video-schedule-update.ts | 1 - server/tests/api/videos/video-transcoder.ts | 6 ++---- 6 files changed, 10 insertions(+), 11 deletions(-) (limited to 'server/tests/api') diff --git a/server/tests/api/activitypub/security.ts b/server/tests/api/activitypub/security.ts index e7899bb14..7349749f1 100644 --- a/server/tests/api/activitypub/security.ts +++ b/server/tests/api/activitypub/security.ts @@ -2,12 +2,13 @@ import 'mocha' -import { flushAndRunMultipleServers, flushTests, killallServers, makePOSTAPRequest, makeFollowRequest, ServerInfo } from '../../utils' +import { flushAndRunMultipleServers, flushTests, killallServers, ServerInfo } from '../../utils' import { HTTP_SIGNATURE } from '../../../initializers' import { buildDigest, buildGlobalHeaders } from '../../../lib/job-queue/handlers/utils/activitypub-http-utils' import * as chai from 'chai' import { setActorField } from '../../utils/miscs/sql' import { activityPubContextify, buildSignedActivity } from '../../../helpers/activitypub' +import { makeFollowRequest, makePOSTAPRequest } from '../../utils/requests/activitypub' const expect = chai.expect diff --git a/server/tests/api/users/index.ts b/server/tests/api/users/index.ts index 0a1b8b0b2..ff433315d 100644 --- a/server/tests/api/users/index.ts +++ b/server/tests/api/users/index.ts @@ -1,5 +1,5 @@ import './blocklist' import './user-subscriptions' import './users' -import './users-verification' import './users-multiple-servers' +import './users-verification' diff --git a/server/tests/api/videos/video-blacklist-management.ts b/server/tests/api/videos/video-blacklist-management.ts index 7bf39dc99..fab577b30 100644 --- a/server/tests/api/videos/video-blacklist-management.ts +++ b/server/tests/api/videos/video-blacklist-management.ts @@ -1,7 +1,7 @@ /* tslint:disable:no-unused-expression */ import * as chai from 'chai' -import * as lodash from 'lodash' +import { orderBy } from 'lodash' import 'mocha' import { addVideoToBlacklist, @@ -22,7 +22,6 @@ import { waitJobs } from '../../utils/server/jobs' import { VideoAbuse } from '../../../../shared/models/videos' const expect = chai.expect -const orderBy = lodash.orderBy describe('Test video blacklist management', function () { let servers: ServerInfo[] = [] diff --git a/server/tests/api/videos/video-channels.ts b/server/tests/api/videos/video-channels.ts index 8138c65d6..41429a3d8 100644 --- a/server/tests/api/videos/video-channels.ts +++ b/server/tests/api/videos/video-channels.ts @@ -7,10 +7,12 @@ import { createUser, doubleFollow, flushAndRunMultipleServers, - getVideoChannelVideos, serverLogin, testImage, + getVideoChannelVideos, + testImage, updateVideo, updateVideoChannelAvatar, - uploadVideo, wait, userLogin + uploadVideo, + userLogin } from '../../utils' import { addVideoChannel, diff --git a/server/tests/api/videos/video-schedule-update.ts b/server/tests/api/videos/video-schedule-update.ts index a260fa4da..b226a9d50 100644 --- a/server/tests/api/videos/video-schedule-update.ts +++ b/server/tests/api/videos/video-schedule-update.ts @@ -16,7 +16,6 @@ import { uploadVideo, wait } from '../../utils' -import { join } from 'path' import { waitJobs } from '../../utils/server/jobs' const expect = chai.expect diff --git a/server/tests/api/videos/video-transcoder.ts b/server/tests/api/videos/video-transcoder.ts index 85795d2ed..23920d452 100644 --- a/server/tests/api/videos/video-transcoder.ts +++ b/server/tests/api/videos/video-transcoder.ts @@ -3,13 +3,13 @@ import * as chai from 'chai' import 'mocha' import { omit } from 'lodash' -import * as ffmpeg from 'fluent-ffmpeg' import { getMaxBitrate, VideoDetails, VideoResolution, VideoState } from '../../../../shared/models/videos' import { audio, getVideoFileBitrate, getVideoFileFPS, getVideoFileResolution } from '../../../helpers/ffmpeg-utils' import { buildAbsoluteFixturePath, doubleFollow, flushAndRunMultipleServers, + generateHighBitrateVideo, getMyVideos, getVideo, getVideosList, @@ -18,12 +18,10 @@ import { ServerInfo, setAccessTokensToServers, uploadVideo, - webtorrentAdd, - generateHighBitrateVideo + webtorrentAdd } from '../../utils' import { join } from 'path' import { waitJobs } from '../../utils/server/jobs' -import { pathExists } from 'fs-extra' import { VIDEO_TRANSCODING_FPS } from '../../../../server/initializers/constants' const expect = chai.expect -- cgit v1.2.3