クラス名変更

This commit is contained in:
野間 2023-05-12 13:08:30 +09:00
parent 7f8b16a0c6
commit 2352471194
4 changed files with 14 additions and 14 deletions

View File

@ -1,9 +1,9 @@
from src.batch.ultmarc.utmp_tables.table_mapper.ultmarc_table_mapper import \
UltmarcTableMapper
from src.batch.ultmarc.utmp_tables.tables.com_snd_med_sphe import ComSenMedSphe
from src.batch.ultmarc.utmp_tables.tables.com_snd_med_sphe import ComSndMedSphe
class ComSenMedSpheMapper(UltmarcTableMapper):
class ComSndMedSpheMapper(UltmarcTableMapper):
"""レイアウト区分123: COM_医療圏二次医療圏 登録処理"""
# レコード存在確認SQL
@ -82,10 +82,10 @@ class ComSenMedSpheMapper(UltmarcTableMapper):
med_sphe_cd = :med_sphe_cd
"""
record: ComSenMedSphe
record: ComSndMedSphe
def __init__(self, record: list[str], db) -> None:
super().__init__(record, db, ComSenMedSphe)
super().__init__(record, db, ComSndMedSphe)
program_name = __name__.split('.')[-1] # 当モジュール名(現行から変わっている)
# モジュール名をクエリパラメータに設定
self.query_parameter['program_name'] = program_name

View File

@ -1,7 +1,7 @@
from src.batch.ultmarc.utmp_tables.tables.ultmarc_table import UltmarcTable
class ComSenMedSphe(UltmarcTable):
class ComSndMedSphe(UltmarcTable):
"""レイアウト区分123: COM_医療圏二次医療圏"""
prefc_cd: str # 県コード
med_sphe_cd: str # 医療圏コード

View File

@ -49,7 +49,7 @@ from src.batch.ultmarc.utmp_tables.table_mapper.concrete.com_med_prefc_mapper im
from src.batch.ultmarc.utmp_tables.table_mapper.concrete.com_thrd_med_mapper import \
ComThrdMedMapper
from src.batch.ultmarc.utmp_tables.table_mapper.concrete.com_snd_med_sphe_mapper import \
ComSenMedSpheMapper
ComSndMedSpheMapper
from src.batch.ultmarc.utmp_tables.table_mapper.concrete.com_med_area_city_mapper import \
ComMedAreaCityMapper
from src.batch.ultmarc.utmp_tables.table_mapper.concrete.null_mapper import \
@ -125,7 +125,7 @@ COM_TABLE_LIST = {
# COM_医療圏次マスタ
"122": ComThrdMedMapper,
# COM_二次医療圏
"123": ComSenMedSpheMapper,
"123": ComSndMedSpheMapper,
# COM_医療圏都道府県市町村対照表
"124": ComMedAreaCityMapper
}

View File

@ -15,7 +15,7 @@ from tests.testing_utility import (assert_table_results,
create_ultmarc_test_data_from_csv)
class TestComSenMedSphe:
class TestComSndMedSphe:
"""レイアウト区分123: COM_医療圏二次医療圏"""
db: Database
@ -66,8 +66,8 @@ class TestComSenMedSphe:
# Act
for line_number, line in enumerate(test_dat_file, start=1):
sut: com_snd_med_sphe_mapper.ComSenMedSphe = create_ultmarc_table_mapper_sut(line, self.db)
assert type(sut) is com_snd_med_sphe_mapper.ComSenMedSpheMapper, f'{line_number}行目:マッパークラスが期通りか'
sut: com_snd_med_sphe_mapper.ComSndMedSphe = create_ultmarc_table_mapper_sut(line, self.db)
assert type(sut) is com_snd_med_sphe_mapper.ComSndMedSpheMapper, f'{line_number}行目:マッパークラスが期通りか'
sut.make_query()
sut.execute_queries()
@ -138,8 +138,8 @@ class TestComSenMedSphe:
# Act
for line_number, line in enumerate(test_dat_file, start=1):
sut: com_snd_med_sphe_mapper.ComSenMedSphe = create_ultmarc_table_mapper_sut(line, self.db)
assert type(sut) is com_snd_med_sphe_mapper.ComSenMedSpheMapper, f'{line_number}行目:マッパークラスが期通りか'
sut: com_snd_med_sphe_mapper.ComSndMedSphe = create_ultmarc_table_mapper_sut(line, self.db)
assert type(sut) is com_snd_med_sphe_mapper.ComSndMedSpheMapper, f'{line_number}行目:マッパークラスが期通りか'
sut.make_query()
sut.execute_queries()
@ -212,8 +212,8 @@ class TestComSenMedSphe:
# Act
for line_number, line in enumerate(test_dat_file, start=1):
sut: com_snd_med_sphe_mapper.ComSenMedSphe = create_ultmarc_table_mapper_sut(line, self.db)
assert type(sut) is com_snd_med_sphe_mapper.ComSenMedSpheMapper, f'{line_number}行目:マッパークラスが期通りか'
sut: com_snd_med_sphe_mapper.ComSndMedSphe = create_ultmarc_table_mapper_sut(line, self.db)
assert type(sut) is com_snd_med_sphe_mapper.ComSndMedSpheMapper, f'{line_number}行目:マッパークラスが期通りか'
sut.make_query()
sut.execute_queries()