mirror of
https://github.com/frappe/bench.git
synced 2025-01-23 15:08:24 +00:00
test: Added tests for app utils
This commit is contained in:
parent
2fed369066
commit
8fb6796250
@ -48,17 +48,17 @@ matrix:
|
||||
- name: "Python 3.7 Tests"
|
||||
python: 3.7
|
||||
env: TEST=bench
|
||||
script: python -m unittest -v bench.tests.test_init
|
||||
script: python -m unittest -v bench.tests.test_init && python -m unittest -v bench.tests.test_utils
|
||||
|
||||
- name: "Python 3.8 Tests"
|
||||
python: 3.8
|
||||
env: TEST=bench
|
||||
script: python -m unittest -v bench.tests.test_init
|
||||
script: python -m unittest -v bench.tests.test_init && python -m unittest -v bench.tests.test_utils
|
||||
|
||||
- name: "Python 3.9 Tests"
|
||||
python: 3.9
|
||||
env: TEST=bench
|
||||
script: python -m unittest -v bench.tests.test_init
|
||||
script: python -m unittest -v bench.tests.test_init && python -m unittest -v bench.tests.test_utils
|
||||
|
||||
- name: "Python 3.7 Easy Install"
|
||||
python: 3.7
|
||||
|
25
bench/tests/test_utils.py
Normal file
25
bench/tests/test_utils.py
Normal file
@ -0,0 +1,25 @@
|
||||
import unittest
|
||||
|
||||
from bench.app import App
|
||||
from bench.bench import Bench
|
||||
from bench.utils import exec_cmd
|
||||
|
||||
|
||||
class TestUtils(unittest.TestCase):
|
||||
def test_app_utils(self):
|
||||
git_url = "https://github.com/frappe/frappe"
|
||||
branch = "develop"
|
||||
app = App(name=git_url, branch=branch, bench=Bench("."))
|
||||
self.assertTrue(
|
||||
all(
|
||||
[
|
||||
app.name == git_url,
|
||||
app.branch == branch,
|
||||
app.tag == branch,
|
||||
app.is_url == True,
|
||||
app.on_disk == False,
|
||||
app.org == "frappe",
|
||||
app.url == git_url,
|
||||
]
|
||||
)
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user