Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
force-bdss
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Adham Hashibon
force-bdss
Merge requests
!44
Cleanup of the MCO communicator interface.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Cleanup of the MCO communicator interface.
send-to-mco-interface
into
master
Overview
1
Commits
1
Pipelines
0
Changes
4
Merged
Adham Hashibon
requested to merge
send-to-mco-interface
into
master
7 years ago
Overview
1
Commits
1
Pipelines
0
Changes
4
Expand
Created by: stefanoborini
Fixed incorrect interface and naming for the MCO
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
ad5665e0
1 commit,
6 years ago
4 files
+
85
−
8
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
force_bdss/mco/tests/test_base_mco_communicator.py
0 → 100644
+
33
−
0
Options
import
unittest
from
force_bdss.mco.base_mco_communicator
import
BaseMCOCommunicator
from
force_bdss.mco.base_mco_model
import
BaseMCOModel
from
force_bdss.mco.i_multi_criteria_optimizer_bundle
import
\
IMultiCriteriaOptimizerBundle
try
:
import
mock
except
ImportError
:
from
unittest
import
mock
from
force_bdss.bdss_application
import
BDSSApplication
class
DummyMCOCommunicator
(
BaseMCOCommunicator
):
def
receive_from_mco
(
self
):
pass
def
send_to_mco
(
self
,
kpi_results
):
pass
class
TestBaseMCOCommunicator
(
unittest
.
TestCase
):
def
test_initialization
(
self
):
bundle
=
mock
.
Mock
(
spec
=
IMultiCriteriaOptimizerBundle
)
application
=
mock
.
Mock
(
spec
=
BDSSApplication
)
model
=
mock
.
Mock
(
spec
=
BaseMCOModel
)
mcocomm
=
DummyMCOCommunicator
(
bundle
,
application
,
model
)
self
.
assertEqual
(
mcocomm
.
bundle
,
bundle
)
self
.
assertEqual
(
mcocomm
.
application
,
application
)
self
.
assertEqual
(
mcocomm
.
model
,
model
)
Loading