mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
History test fixes.
This commit is contained in:
@@ -372,7 +372,7 @@ class RootController( BaseController ):
|
||||
|
||||
@web.expose
|
||||
@web.require_login( "share histories with other users" )
|
||||
def history_share( self, trans, id=None, email=None, **kwd ):
|
||||
def history_share( self, trans, id=None, email="", **kwd ):
|
||||
send_to_err = ""
|
||||
if not id:
|
||||
id = trans.get_history().id
|
||||
@@ -385,7 +385,7 @@ class RootController( BaseController ):
|
||||
history_names.append(histories[-1].name)
|
||||
if not email:
|
||||
return trans.fill_template("/history/share.mako", histories=histories, email=email, send_to_err=send_to_err)
|
||||
|
||||
user = trans.get_user()
|
||||
send_to_user = trans.app.model.User.get_by( email = email )
|
||||
if not send_to_user:
|
||||
send_to_err = "No such user"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="toolForm">
|
||||
<div class="toolFormTitle">Share Histories</div>
|
||||
<table>
|
||||
<form action="$h.url_for('/history_share')" method="post" >
|
||||
<form action="${h.url_for( action='history_share' )}" method="post" >
|
||||
<tr><th>History Name:</td><th>Number of Datasets:</th><th>Share Link</th></tr>
|
||||
%for history in histories:
|
||||
<tr><td align="center">${history.name}<input type="hidden" name="id" value="${history.id}"></td><td align="center">
|
||||
|
||||
@@ -21,7 +21,7 @@ class TestHistory( TwillTestCase ):
|
||||
"""Testing history options when logged in"""
|
||||
self.history_options()
|
||||
self.check_page_for_string( 'Rename</a> current history')
|
||||
self.check_page_for_string( 'View</a> previously stored histories')
|
||||
self.check_page_for_string( 'List</a> previously stored histories')
|
||||
self.check_page_for_string( 'Share</a> current history')
|
||||
self.check_page_for_string( 'Delete</a> current history')
|
||||
def test_10_history_rename( self ):
|
||||
@@ -33,9 +33,9 @@ class TestHistory( TwillTestCase ):
|
||||
self.view_stored_histories()
|
||||
self.check_page_for_string( 'Stored Histories' )
|
||||
self.check_page_for_string( '<input type=checkbox name="id" value=' )
|
||||
self.check_page_for_string( '<a href="history_rename?id' )
|
||||
self.check_page_for_string( '<a href="history_switch?id' )
|
||||
self.check_page_for_string( '<a href="/history_delete?id' )
|
||||
self.check_page_for_string( 'history_rename?id' )
|
||||
self.check_page_for_string( 'history_switch?id' )
|
||||
self.check_page_for_string( 'history_delete?id' )
|
||||
def test_20_delete_history_item( self ):
|
||||
"""Testing deleting history item"""
|
||||
self.upload_file('1.bed', dbkey='hg15')
|
||||
|
||||
Reference in New Issue
Block a user