Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
beat.web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
54
Issues
54
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
beat
beat.web
Commits
367abe4c
Commit
367abe4c
authored
Apr 25, 2016
by
André Anjos
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[tests] Use tearDownModule from common to erase test_prefix directory after the end of tests
parent
ed3373c8
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
41 additions
and
34 deletions
+41
-34
beat/web/algorithms/tests/core.py
beat/web/algorithms/tests/core.py
+3
-4
beat/web/algorithms/tests/tests.py
beat/web/algorithms/tests/tests.py
+2
-1
beat/web/algorithms/tests/tests_api.py
beat/web/algorithms/tests/tests_api.py
+2
-1
beat/web/algorithms/tests/tests_team.py
beat/web/algorithms/tests/tests_team.py
+3
-2
beat/web/algorithms/tests/tests_user.py
beat/web/algorithms/tests/tests_user.py
+1
-0
beat/web/attestations/tests.py
beat/web/attestations/tests.py
+1
-1
beat/web/backend/tests.py
beat/web/backend/tests.py
+1
-8
beat/web/common/testutils.py
beat/web/common/testutils.py
+8
-8
beat/web/dataformats/tests/core.py
beat/web/dataformats/tests/core.py
+2
-2
beat/web/dataformats/tests/tests.py
beat/web/dataformats/tests/tests.py
+2
-0
beat/web/dataformats/tests/tests_api.py
beat/web/dataformats/tests/tests_api.py
+1
-0
beat/web/dataformats/tests/tests_user.py
beat/web/dataformats/tests/tests_user.py
+1
-0
beat/web/experiments/tests.py
beat/web/experiments/tests.py
+1
-1
beat/web/libraries/tests/core.py
beat/web/libraries/tests/core.py
+3
-3
beat/web/libraries/tests/tests_api.py
beat/web/libraries/tests/tests_api.py
+2
-0
beat/web/libraries/tests/tests_team.py
beat/web/libraries/tests/tests_team.py
+2
-1
beat/web/libraries/tests/tests_user.py
beat/web/libraries/tests/tests_user.py
+2
-0
beat/web/reports/tests.py
beat/web/reports/tests.py
+1
-0
beat/web/team/tests.py
beat/web/team/tests.py
+2
-1
beat/web/toolchains/tests.py
beat/web/toolchains/tests.py
+1
-1
No files found.
beat/web/algorithms/tests/core.py
View file @
367abe4c
...
...
@@ -34,10 +34,9 @@ import simplejson as json
from
django.contrib.auth.models
import
User
from
django.conf
import
settings
from
beat.web.dataformats.models
import
DataFormat
from
beat.web.common.testutils
import
BaseTestCase
from
beat.web.team.models
import
Team
from
...dataformats.models
import
DataFormat
from
...common.testutils
import
BaseTestCase
,
tearDownModule
from
...team.models
import
Team
from
..models
import
Algorithm
...
...
beat/web/algorithms/tests/tests.py
View file @
367abe4c
...
...
@@ -27,7 +27,8 @@
from
django.contrib.auth.models
import
User
from
beat.web.libraries.models
import
Library
from
...libraries.models
import
Library
from
...common.testutils
import
tearDownModule
from
..models
import
Algorithm
...
...
beat/web/algorithms/tests/tests_api.py
View file @
367abe4c
...
...
@@ -32,7 +32,8 @@ from django.contrib.auth.models import User
from
django.conf
import
settings
from
django.core.urlresolvers
import
reverse
from
beat.web.dataformats.models
import
DataFormat
from
...dataformats.models
import
DataFormat
from
...common.testutils
import
tearDownModule
import
beat.core.algorithm
...
...
beat/web/algorithms/tests/tests_team.py
View file @
367abe4c
...
...
@@ -27,8 +27,9 @@
from
django.contrib.auth.models
import
User
from
beat.web.team.models
import
Team
from
beat.web.dataformats.models
import
DataFormat
from
...team.models
import
Team
from
...dataformats.models
import
DataFormat
from
...common.testutils
import
tearDownModule
from
..models
import
Algorithm
...
...
beat/web/algorithms/tests/tests_user.py
View file @
367abe4c
...
...
@@ -29,6 +29,7 @@
from
..models
import
Algorithm
from
.core
import
AlgorithmsAccessibilityFunctionsBase
from
...common.testutils
import
tearDownModule
class
NotSharedAlgorithm_CheckAccessibilityFunction
(
AlgorithmsAccessibilityFunctionsBase
):
...
...
beat/web/attestations/tests.py
View file @
367abe4c
...
...
@@ -46,7 +46,7 @@ from ..dataformats.models import DataFormat
from
..toolchains.models
import
Toolchain
from
..databases.models
import
Database
from
..common.testutils
import
BaseTestCase
from
..common.testutils
import
BaseTestCase
,
tearDownModule
class
AttestationsAPIBase
(
BaseTestCase
):
...
...
beat/web/backend/tests.py
View file @
367abe4c
...
...
@@ -40,7 +40,7 @@ from django.test import TestCase
from
guardian.shortcuts
import
get_perms
from
..common.testutils
import
BaseTestCase
as
APITestCase
from
..common.testutils
import
BaseTestCase
as
APITestCase
,
tearDownModule
from
..experiments.models
import
Experiment
,
Block
from
..algorithms.models
import
Algorithm
from
..utils.management.commands
import
install
...
...
@@ -234,13 +234,6 @@ PRIORITY_QUEUES = {
}
def
tearDownModule
():
if
os
.
path
.
exists
(
settings
.
CACHE_ROOT
):
shutil
.
rmtree
(
settings
.
CACHE_ROOT
)
if
os
.
path
.
exists
(
settings
.
PREFIX
):
shutil
.
rmtree
(
settings
.
PREFIX
)
class
CancelAllExperimentsAPI
(
APITestCase
):
def
setUp
(
self
):
...
...
beat/web/common/testutils.py
View file @
367abe4c
...
...
@@ -38,17 +38,17 @@ import simplejson as json
from
.models
import
Shareable
class
BaseTestCase
(
TestCase
):
class
Meta
:
model
=
None
def
tearDownModule
():
if
os
.
path
.
exists
(
settings
.
CACHE_ROOT
):
shutil
.
rmtree
(
settings
.
CACHE_ROOT
)
if
os
.
path
.
exists
(
settings
.
PREFIX
):
shutil
.
rmtree
(
settings
.
PREFIX
)
def
tearDown
(
self
):
if
os
.
path
.
exists
(
settings
.
CACHE_ROOT
):
shutil
.
rmtree
(
settings
.
CACHE_ROOT
)
if
os
.
path
.
exists
(
settings
.
PREFIX
):
shutil
.
rmtree
(
settings
.
PREFIX
)
class
BaseTestCase
(
TestCase
):
class
Meta
:
model
=
None
def
checkObjectDBSharingPreferences
(
self
,
contribution
,
reference
):
...
...
beat/web/dataformats/tests/core.py
View file @
367abe4c
...
...
@@ -35,8 +35,8 @@ from django.contrib.auth.models import User
from
..models
import
DataFormat
from
beat.web
.team.models
import
Team
from
beat.web.common.testutils
import
BaseTestCas
e
from
..
.team.models
import
Team
from
...common.testutils
import
BaseTestCase
,
tearDownModul
e
class
DataFormatsAccessibilityFunctionsBase
(
BaseTestCase
):
...
...
beat/web/dataformats/tests/tests.py
View file @
367abe4c
...
...
@@ -33,6 +33,8 @@ from django.test import TestCase
from
django.conf
import
settings
from
django.contrib.auth.models
import
User
from
...common.testutils
import
tearDownModule
from
beat.core.dataformat
import
Storage
,
DataFormat
as
CoreDataFormat
from
..models
import
DataFormat
...
...
beat/web/dataformats/tests/tests_api.py
View file @
367abe4c
...
...
@@ -32,6 +32,7 @@ from django.contrib.auth.models import User
from
django.conf
import
settings
from
django.core.urlresolvers
import
reverse
from
...common.testutils
import
tearDownModule
from
..models
import
DataFormat
from
core
import
DataFormatsAPIBase
,
DataFormatSharingAPIBase
...
...
beat/web/dataformats/tests/tests_user.py
View file @
367abe4c
...
...
@@ -28,6 +28,7 @@
from
core
import
DataFormatsAccessibilityFunctionsBase
from
...common.testutils
import
tearDownModule
from
..models
import
DataFormat
class
NotSharedDataFormat_CheckAccessibilityFunction
(
DataFormatsAccessibilityFunctionsBase
):
...
...
beat/web/experiments/tests.py
View file @
367abe4c
...
...
@@ -50,7 +50,7 @@ from ..backend.models import Queue
from
..attestations.models
import
Attestation
from
..databases.models
import
Database
from
..common.testutils
import
BaseTestCase
from
..common.testutils
import
BaseTestCase
,
tearDownModule
HASHES
=
{
'addition1'
:
'ff59a471cec5c17b45d1dfa5aff3ed897ee2d7ed87de205365b372be1c726c87'
,
...
...
beat/web/libraries/tests/core.py
View file @
367abe4c
...
...
@@ -34,10 +34,10 @@ import simplejson as json
from
django.contrib.auth.models
import
User
from
django.conf
import
settings
from
beat.web
.dataformats.models
import
DataFormat
from
..
.dataformats.models
import
DataFormat
from
beat.web.common.testutils
import
BaseTestCas
e
from
beat.web
.team.models
import
Team
from
...common.testutils
import
BaseTestCase
,
tearDownModul
e
from
..
.team.models
import
Team
from
..models
import
Library
...
...
beat/web/libraries/tests/tests_api.py
View file @
367abe4c
...
...
@@ -34,6 +34,8 @@ from django.core.urlresolvers import reverse
import
beat.core.library
from
...common.testutils
import
tearDownModule
from
..models
import
Library
from
.core
import
LibrariesAPIBase
...
...
beat/web/libraries/tests/tests_team.py
View file @
367abe4c
...
...
@@ -27,7 +27,8 @@
from
django.contrib.auth.models
import
User
from
beat.web.team.models
import
Team
from
...common.testutils
import
tearDownModule
from
...team.models
import
Team
from
..models
import
Library
...
...
beat/web/libraries/tests/tests_user.py
View file @
367abe4c
...
...
@@ -26,6 +26,8 @@
###############################################################################
from
...common.testutils
import
tearDownModule
from
..models
import
Library
from
.core
import
LibrariesAccessibilityFunctionsBase
...
...
beat/web/reports/tests.py
View file @
367abe4c
...
...
@@ -47,6 +47,7 @@ from ..plotters.models import Plotter
from
..plotters.models
import
PlotterParameter
from
..common.models
import
Shareable
from
..common.testutils
import
tearDownModule
from
..backend.models
import
Environment
from
..backend.models
import
Queue
...
...
beat/web/team/tests.py
View file @
367abe4c
...
...
@@ -34,6 +34,7 @@ from django.contrib.auth.models import User
import
simplejson
as
json
from
..common.testutils
import
tearDownModule
from
.models
import
Team
from
.serializers
import
SimpleTeamSerializer
...
...
@@ -221,8 +222,8 @@ class TeamAddMemberTestCase(TeamTestCase):
'is_owner'
:
True
,
'accessibility'
:
'public'
,
'members'
:
[
self
.
johndoe
.
username
,
self
.
jackdoe
.
username
,
self
.
johndoe
.
username
,
]
}
...
...
beat/web/toolchains/tests.py
View file @
367abe4c
...
...
@@ -40,7 +40,7 @@ import beat.core.toolchain
from
.models
import
Toolchain
from
..common.models
import
Shareable
from
..common.testutils
import
BaseTestCase
from
..common.testutils
import
BaseTestCase
,
tearDownModule
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment