bimtester: steps, translate some project attribute tests

This commit is contained in:
Bernd Hahnebach
2021-01-15 20:35:12 +01:00
parent 1d0b13960f
commit a04ce8a24d
3 changed files with 44 additions and 1 deletions
@@ -0,0 +1,20 @@
from behave import step
from utils import assert_attribute
from utils import IfcFile
from utils import switch_locale
the_lang = "de"
@step("Die Globale Identifikationskennung (Globally Unique Identifier = GUID) des Projektes ist {guid}")
def step_impl(context, guid):
switch_locale(context.localedir, the_lang)
assert_attribute(IfcFile.get().by_type("IfcProject")[0], "GlobalId", guid)
@step('Der Name, die Abkürzung oder die Kurzkennung des Projektes ist "{value}"')
def step_impl(context, value):
switch_locale(context.localedir, the_lang)
assert_attribute(IfcFile.get().by_type("IfcProject")[0], "Name", value)
@@ -0,0 +1,23 @@
from behave import step
from utils import assert_attribute
from utils import IfcFile
from utils import switch_locale
the_lang = "fr"
"""
# TODO the next line needs translation
@step("The project must have an identifier of {guid}")
def step_impl(context, guid):
switch_locale(context.localedir, the_lang)
assert_attribute(IfcFile.get().by_type("IfcProject")[0], "GlobalId", guid)
@step('The project name, code, or short identifier must be "{value}"')
def step_impl(context, value):
switch_locale(context.localedir, the_lang)
assert_attribute(IfcFile.get().by_type("IfcProject")[0], "Name", value)
"""
@@ -14,4 +14,4 @@ Szenario: Bereitstellen von IFC-Daten
Szenario: Projektinformationen
* The project name, code, or short identifier must be "BIMTester Example 1"
* Der Name, die Abkürzung oder die Kurzkennung des Projektes ist "BIMTester Example 1"