mirror of
https://github.com/13hannes11/bachelor_thesis_m.recommend.git
synced 2024-09-04 01:11:00 +02:00
add recommender to repository
This commit is contained in:
28
tests/test_model/test_configuration_model.py
Normal file
28
tests/test_model/test_configuration_model.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from model.configuration_model import ConfigurationModel, ConfigurationVariablesModel
|
||||
import math
|
||||
import pytest
|
||||
|
||||
class TestConfigurationModel:
|
||||
def test_simple_parsing(self):
|
||||
data = {
|
||||
'configuration': ['code1', 'code2'],
|
||||
'variables': [
|
||||
{
|
||||
'code': 'abc',
|
||||
'value': 1
|
||||
}
|
||||
]
|
||||
}
|
||||
conf = ConfigurationModel(data)
|
||||
assert len(conf.configuration) == 2
|
||||
assert len(conf.variables) == 1
|
||||
|
||||
class TestConfigurationVariableModel:
|
||||
def test_simple_parsing(self):
|
||||
data = {
|
||||
'code': 'abc',
|
||||
'value': 1
|
||||
}
|
||||
var = ConfigurationVariablesModel(data)
|
||||
assert var.code == 'abc'
|
||||
assert var.value == 1
|
||||
Reference in New Issue
Block a user