mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-03 06:55:09 -04:00
Make sure tests can find the correct paths (fixes #284)
This commit is contained in:
parent
277805ba5b
commit
9f78e34d5b
1 changed files with 7 additions and 1 deletions
|
@ -17,9 +17,15 @@ GNU General Public License for more details.
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
"""
|
"""
|
||||||
import locale
|
import locale, os
|
||||||
from onionshare import helpers, strings
|
from onionshare import helpers, strings
|
||||||
|
|
||||||
|
# Stub get_resource_path so it finds the correct path while running tests
|
||||||
|
def get_resource_path(filename):
|
||||||
|
resources_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'resources')
|
||||||
|
path = os.path.join(resources_dir, filename)
|
||||||
|
return path
|
||||||
|
helpers.get_resource_path = get_resource_path
|
||||||
|
|
||||||
def test_starts_with_empty_strings():
|
def test_starts_with_empty_strings():
|
||||||
"""creates an empty strings dict by default"""
|
"""creates an empty strings dict by default"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue