Page Menu
Home
Search
Configure Global Search
Log In
Files
F13250058
abstract_attract_test.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
1 KB
Subscribers
None
abstract_attract_test.py
View Options
from
pillar.tests
import
PillarTestServer
,
AbstractPillarTest
MOCK_SVN_URL
=
'svn://biserver/mocked'
class
AttractTestServer
(
PillarTestServer
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
PillarTestServer
.
__init__
(
self
,
*
args
,
**
kwargs
)
from
attract
import
AttractExtension
self
.
load_extension
(
AttractExtension
(),
'/attract'
)
class
AbstractAttractTest
(
AbstractPillarTest
):
pillar_server_class
=
AttractTestServer
def
tearDown
(
self
):
self
.
unload_modules
(
'attract'
)
AbstractPillarTest
.
tearDown
(
self
)
def
ensure_project_exists
(
self
,
project_overrides
=
None
):
from
attract.setup
import
setup_for_attract
project_overrides
=
dict
(
picture_header
=
None
,
picture_square
=
None
,
**
(
project_overrides
or
{})
)
proj_id
,
project
=
AbstractPillarTest
.
ensure_project_exists
(
self
,
project_overrides
)
with
self
.
app
.
test_request_context
():
attract_project
=
setup_for_attract
(
project
[
'url'
],
replace
=
True
,
svn_url
=
MOCK_SVN_URL
)
return
proj_id
,
attract_project
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Mon, Jul 4, 7:11 PM (2 d)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
fc/80/8d7a127735411394011ddcc7915e
Attached To
rA Attract
Event Timeline
Log In to Comment