Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aura-engine
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Kruse
aura-engine
Commits
ae4f1a25
Commit
ae4f1a25
authored
5 years ago
by
David Trattnig
Browse files
Options
Downloads
Patches
Plain Diff
Removed old references.
parent
af88263d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
testing/test.py
+12
-11
12 additions, 11 deletions
testing/test.py
with
12 additions
and
11 deletions
testing/test.py
+
12
−
11
View file @
ae4f1a25
...
@@ -8,7 +8,7 @@ from datetime import datetime
...
@@ -8,7 +8,7 @@ from datetime import datetime
from
libraries.base.logger
import
AuraLogger
from
libraries.base.logger
import
AuraLogger
from
libraries.base.config
import
AuraConfig
from
libraries.base.config
import
AuraConfig
# libraries.database
# libraries.database
from
libraries.database.broadcasts
import
Schedule
,
ScheduleEntry
,
TrackService
from
libraries.database.broadcasts
import
Schedule
,
TrackService
# libraries.security
# libraries.security
# from libraries.security.user import AuraUser
# from libraries.security.user import AuraUser
...
@@ -20,7 +20,8 @@ class TestLogger(unittest.TestCase):
...
@@ -20,7 +20,8 @@ class TestLogger(unittest.TestCase):
aura_logger
=
None
aura_logger
=
None
def
setUp
(
self
):
def
setUp
(
self
):
self
.
aura_logger
=
AuraLogger
()
self
.
config
=
AuraConfig
()
self
.
aura_logger
=
AuraLogger
(
self
.
config
)
def
test_logger
(
self
):
def
test_logger
(
self
):
self
.
assertTrue
(
self
.
aura_logger
.
logger
.
hasHandlers
())
self
.
assertTrue
(
self
.
aura_logger
.
logger
.
hasHandlers
())
...
@@ -34,23 +35,23 @@ class TestConfig(unittest.TestCase):
...
@@ -34,23 +35,23 @@ class TestConfig(unittest.TestCase):
def
test_config
(
self
):
def
test_config
(
self
):
# is ini path correct set?
# is ini path correct set?
self
.
assertEqual
(
self
.
aura_config
.
config
.
ini_path
,
"
/etc/aura/engine.ini
"
)
self
.
assertEqual
(
self
.
config
.
ini_path
,
"
/etc/aura/engine.ini
"
)
# install_dir is set by runtime. is it a directory?
# install_dir is set by runtime. is it a directory?
self
.
assertTrue
(
os
.
path
.
isdir
(
self
.
aura_config
.
config
.
get
(
"
install_dir
"
)))
self
.
assertTrue
(
os
.
path
.
isdir
(
self
.
config
.
get
(
"
install_dir
"
)))
# calendarurl and importerurl set and valid urls?
# calendarurl and importerurl set and valid urls?
self
.
assertTrue
(
validators
.
url
(
self
.
aura_config
.
config
.
get
(
"
calendarurl
"
)))
self
.
assertTrue
(
validators
.
url
(
self
.
config
.
get
(
"
calendarurl
"
)))
self
.
assertTrue
(
validators
.
url
(
self
.
aura_config
.
config
.
get
(
"
importerurl
"
)))
self
.
assertTrue
(
validators
.
url
(
self
.
config
.
get
(
"
importerurl
"
)))
# is liquidsoap socketdir set and a directory?
# is liquidsoap socketdir set and a directory?
self
.
assertTrue
(
os
.
path
.
isdir
(
self
.
aura_config
.
config
.
get
(
"
socketdir
"
)))
self
.
assertTrue
(
os
.
path
.
isdir
(
self
.
config
.
get
(
"
socketdir
"
)))
# database settings set?
# database settings set?
self
.
assertIsNotNone
(
self
.
aura_config
.
config
.
get
(
"
db_user
"
))
self
.
assertIsNotNone
(
self
.
config
.
get
(
"
db_user
"
))
self
.
assertIsNotNone
(
self
.
aura_config
.
config
.
get
(
"
db_pass
"
))
self
.
assertIsNotNone
(
self
.
config
.
get
(
"
db_pass
"
))
self
.
assertIsNotNone
(
self
.
aura_config
.
config
.
get
(
"
db_name
"
))
self
.
assertIsNotNone
(
self
.
config
.
get
(
"
db_name
"
))
self
.
assertIsNotNone
(
self
.
aura_config
.
config
.
get
(
"
db_host
"
))
self
.
assertIsNotNone
(
self
.
config
.
get
(
"
db_host
"
))
class
TestSchedule
(
unittest
.
TestCase
):
class
TestSchedule
(
unittest
.
TestCase
):
schedule
=
None
schedule
=
None
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment