Run the vehicle/ordnance report tests for each year for the landing craft.

master
Pacman Ghost 4 years ago
parent 91204321f9
commit 29235584f6
  1. 12
      vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/landing-craft/1940.txt
  2. 12
      vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/landing-craft/1941.txt
  3. 12
      vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/landing-craft/1942.txt
  4. 12
      vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/landing-craft/1943.txt
  5. 4
      vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/landing-craft/1944.txt
  6. 12
      vasl_templates/webapp/tests/fixtures/vo-reports/vehicles/landing-craft/1945.txt
  7. 33
      vasl_templates/webapp/tests/test_vo_reports.py
  8. 11
      vasl_templates/webapp/vo.py

@ -0,0 +1,12 @@
=== vehicles/landing-craft/1940 ===
Name Capabilities (effective) # Notes Comments
-------- -------------- ------------- --- ------------------------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LCP(L) DP 2 CS 4 DP 2 CS 4 1† A†<sup>1</sup> B†<sup>3</sup> C†<sup>2</sup> D British: Unarmored &amp; unarmed; Inherent Crew | MA: 4&amp;4 | Front as Open-Topped AFV | Normal Range = 8 | No ramp, (un)load &#215;2 [EXC: Pier]
LCA DP 3 CS 6 DP 3 CS 6 2† n/a Personnel/SW only | Collateral Attacks: &#189; FP
LCVP DP 3 CS 5 DP 3 CS 5 3† B†<sup>2</sup> C†<sup>1</sup> Inherent Crew | MA: 4&amp;4 | Unarmored &amp; unarmed | Normal Range = 8
LCM(3) DP 5 CS 6 DP 5 CS 6 4† B†<sup>2</sup> C†<sup>1</sup> MA: 2&amp;2 or 6&amp;6 | Normal Range = 8
LCI(S) DP 14 CS 10 DP 14 CS 10 5† C†<sup>3</sup> D E†<sup>2</sup> F†<sup>1</sup> G AAMG: 2&amp;2 | -3 Target Size [{ *:One-level LOS obstacle across Side *:Units may not move through Location }] | Cloaked Passengers | No ramp, (un)load &#215;2 [EXC: Pier] | MA: 2&#215; AA [{ *:IFE Normal Range = 16 *:VCA and/or adjacent/same-hex &#8804; level NA }] | Stun: dr &#8805; 5 | Unbeaching: -1 DRM
LCT(4) DP 10 CS 9 DP 10 CS 9 6† C†<sup>3</sup> E†<sup>2</sup> F†<sup>1</sup> G -4 Target Size [{ *:One-level LOS obstacle across Side *:Units may not move through Location }] | Infantry Stack unload | MA: 2&#215; AA [{ *:IFE Normal Range = 16 *:VCA and/or adjacent/same-hex &#8804; level NA }] | Stun: dr &#8805; 5 | Unbeaching: -1 DRM
Daihatsu DP 3 CS 4 DP 3 CS 4 7† A†<sup>1</sup> AAMG: Rear/port-side only | Front as Open-Topped AFV
Shohatsu DP 2 CS 3 DP 2 CS 3 8† A† D Passengers: BU NA | Front as Open-Topped AFV | No ramp, (un)load &#215;2 [EXC: Pier]

@ -0,0 +1,12 @@
=== vehicles/landing-craft/1941 ===
Name Capabilities (effective) # Notes Comments
-------- -------------- ------------- --- ------------------------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LCP(L) DP 2 CS 4 DP 2 CS 4 1† A†<sup>1</sup> B†<sup>3</sup> C†<sup>2</sup> D British: Unarmored &amp; unarmed; Inherent Crew | MA: 4&amp;4 | Front as Open-Topped AFV | Normal Range = 8 | No ramp, (un)load &#215;2 [EXC: Pier]
LCA DP 3 CS 6 DP 3 CS 6 2† n/a Personnel/SW only | Collateral Attacks: &#189; FP
LCVP DP 3 CS 5 DP 3 CS 5 3† B†<sup>2</sup> C†<sup>1</sup> Inherent Crew | MA: 4&amp;4 | Unarmored &amp; unarmed | Normal Range = 8
LCM(3) DP 5 CS 6 DP 5 CS 6 4† B†<sup>2</sup> C†<sup>1</sup> MA: 2&amp;2 or 6&amp;6 | Normal Range = 8
LCI(S) DP 14 CS 10 DP 14 CS 10 5† C†<sup>3</sup> D E†<sup>2</sup> F†<sup>1</sup> G AAMG: 2&amp;2 | -3 Target Size [{ *:One-level LOS obstacle across Side *:Units may not move through Location }] | Cloaked Passengers | No ramp, (un)load &#215;2 [EXC: Pier] | MA: 2&#215; AA [{ *:IFE Normal Range = 16 *:VCA and/or adjacent/same-hex &#8804; level NA }] | Stun: dr &#8805; 5 | Unbeaching: -1 DRM
LCT(4) DP 10 CS 9 DP 10 CS 9 6† C†<sup>3</sup> E†<sup>2</sup> F†<sup>1</sup> G -4 Target Size [{ *:One-level LOS obstacle across Side *:Units may not move through Location }] | Infantry Stack unload | MA: 2&#215; AA [{ *:IFE Normal Range = 16 *:VCA and/or adjacent/same-hex &#8804; level NA }] | Stun: dr &#8805; 5 | Unbeaching: -1 DRM
Daihatsu DP 3 CS 4 DP 3 CS 4 7† A†<sup>1</sup> AAMG: Rear/port-side only | Front as Open-Topped AFV
Shohatsu DP 2 CS 3 DP 2 CS 3 8† A† D Passengers: BU NA | Front as Open-Topped AFV | No ramp, (un)load &#215;2 [EXC: Pier]

@ -0,0 +1,12 @@
=== vehicles/landing-craft/1942 ===
Name Capabilities (effective) # Notes Comments
-------- -------------- ------------- --- ------------------------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LCP(L) DP 2 CS 4 DP 2 CS 4 1† A†<sup>1</sup> B†<sup>3</sup> C†<sup>2</sup> D British: Unarmored &amp; unarmed; Inherent Crew | MA: 4&amp;4 | Front as Open-Topped AFV | Normal Range = 8 | No ramp, (un)load &#215;2 [EXC: Pier]
LCA DP 3 CS 6 DP 3 CS 6 2† n/a Personnel/SW only | Collateral Attacks: &#189; FP
LCVP DP 3 CS 5 DP 3 CS 5 3† B†<sup>2</sup> C†<sup>1</sup> Inherent Crew | MA: 4&amp;4 | Unarmored &amp; unarmed | Normal Range = 8
LCM(3) DP 5 CS 6 DP 5 CS 6 4† B†<sup>2</sup> C†<sup>1</sup> MA: 2&amp;2 or 6&amp;6 | Normal Range = 8
LCI(S) DP 14 CS 10 DP 14 CS 10 5† C†<sup>3</sup> D E†<sup>2</sup> F†<sup>1</sup> G AAMG: 2&amp;2 | -3 Target Size [{ *:One-level LOS obstacle across Side *:Units may not move through Location }] | Cloaked Passengers | No ramp, (un)load &#215;2 [EXC: Pier] | MA: 2&#215; AA [{ *:IFE Normal Range = 16 *:VCA and/or adjacent/same-hex &#8804; level NA }] | Stun: dr &#8805; 5 | Unbeaching: -1 DRM
LCT(4) DP 10 CS 9 DP 10 CS 9 6† C†<sup>3</sup> E†<sup>2</sup> F†<sup>1</sup> G -4 Target Size [{ *:One-level LOS obstacle across Side *:Units may not move through Location }] | Infantry Stack unload | MA: 2&#215; AA [{ *:IFE Normal Range = 16 *:VCA and/or adjacent/same-hex &#8804; level NA }] | Stun: dr &#8805; 5 | Unbeaching: -1 DRM
Daihatsu DP 3 CS 4 DP 3 CS 4 7† A†<sup>1</sup> AAMG: Rear/port-side only | Front as Open-Topped AFV
Shohatsu DP 2 CS 3 DP 2 CS 3 8† A† D Passengers: BU NA | Front as Open-Topped AFV | No ramp, (un)load &#215;2 [EXC: Pier]

@ -0,0 +1,12 @@
=== vehicles/landing-craft/1943 ===
Name Capabilities (effective) # Notes Comments
-------- -------------- ------------- --- ------------------------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LCP(L) DP 2 CS 4 DP 2 CS 4 1† A†<sup>1</sup> B†<sup>3</sup> C†<sup>2</sup> D British: Unarmored &amp; unarmed; Inherent Crew | MA: 4&amp;4 | Front as Open-Topped AFV | Normal Range = 8 | No ramp, (un)load &#215;2 [EXC: Pier]
LCA DP 3 CS 6 DP 3 CS 6 2† n/a Personnel/SW only | Collateral Attacks: &#189; FP
LCVP DP 3 CS 5 DP 3 CS 5 3† B†<sup>2</sup> C†<sup>1</sup> Inherent Crew | MA: 4&amp;4 | Unarmored &amp; unarmed | Normal Range = 8
LCM(3) DP 5 CS 6 DP 5 CS 6 4† B†<sup>2</sup> C†<sup>1</sup> MA: 2&amp;2 or 6&amp;6 | Normal Range = 8
LCI(S) DP 14 CS 10 DP 14 CS 10 5† C†<sup>3</sup> D E†<sup>2</sup> F†<sup>1</sup> G AAMG: 2&amp;2 | -3 Target Size [{ *:One-level LOS obstacle across Side *:Units may not move through Location }] | Cloaked Passengers | No ramp, (un)load &#215;2 [EXC: Pier] | MA: 2&#215; AA [{ *:IFE Normal Range = 16 *:VCA and/or adjacent/same-hex &#8804; level NA }] | Stun: dr &#8805; 5 | Unbeaching: -1 DRM
LCT(4) DP 10 CS 9 DP 10 CS 9 6† C†<sup>3</sup> E†<sup>2</sup> F†<sup>1</sup> G -4 Target Size [{ *:One-level LOS obstacle across Side *:Units may not move through Location }] | Infantry Stack unload | MA: 2&#215; AA [{ *:IFE Normal Range = 16 *:VCA and/or adjacent/same-hex &#8804; level NA }] | Stun: dr &#8805; 5 | Unbeaching: -1 DRM
Daihatsu DP 3 CS 4 DP 3 CS 4 7† A†<sup>1</sup> AAMG: Rear/port-side only | Front as Open-Topped AFV
Shohatsu DP 2 CS 3 DP 2 CS 3 8† A† D Passengers: BU NA | Front as Open-Topped AFV | No ramp, (un)load &#215;2 [EXC: Pier]

@ -1,10 +1,10 @@
=== landing craft ===
=== vehicles/landing-craft/1944 ===
Name Capabilities (effective) # Notes Comments
-------- -------------- ------------- --- ------------------------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LCP(L) DP 2 CS 4 DP 2 CS 4 1† A†<sup>1</sup> B†<sup>3</sup> C†<sup>2</sup> D British: Unarmored &amp; unarmed; Inherent Crew | MA: 4&amp;4 | Front as Open-Topped AFV | Normal Range = 8 | No ramp, (un)load &#215;2 [EXC: Pier]
LCA DP 3 CS 6 DP 3 CS 6 2† n/a Personnel/SW only | Collateral Attacks: &#189; FP
LCVP DP 3 CS 5 DP 3 CS 5 3† B†<sup>2</sup> C†<sup>1</sup> Inherent Crew | MA: 4&amp;4 | Unarmored &amp; unarmed (pre-6/43) | Normal Range = 8
LCVP DP 3 CS 5 DP 3 CS 5 3† B†<sup>2</sup> C†<sup>1</sup> Inherent Crew | MA: 4&amp;4 | Normal Range = 8
LCM(3) DP 5 CS 6 DP 5 CS 6 4† B†<sup>2</sup> C†<sup>1</sup> MA: 2&amp;2 or 6&amp;6 | Normal Range = 8
LCI(S) DP 14 CS 10 DP 14 CS 10 5† C†<sup>3</sup> D E†<sup>2</sup> F†<sup>1</sup> G AAMG: 2&amp;2 | -3 Target Size [{ *:One-level LOS obstacle across Side *:Units may not move through Location }] | Cloaked Passengers | No ramp, (un)load &#215;2 [EXC: Pier] | MA: 2&#215; AA [{ *:IFE Normal Range = 16 *:VCA and/or adjacent/same-hex &#8804; level NA }] | Stun: dr &#8805; 5 | Unbeaching: -1 DRM
LCT(4) DP 10 CS 9 DP 10 CS 9 6† C†<sup>3</sup> E†<sup>2</sup> F†<sup>1</sup> G -4 Target Size [{ *:One-level LOS obstacle across Side *:Units may not move through Location }] | Infantry Stack unload | MA: 2&#215; AA [{ *:IFE Normal Range = 16 *:VCA and/or adjacent/same-hex &#8804; level NA }] | Stun: dr &#8805; 5 | Unbeaching: -1 DRM

@ -0,0 +1,12 @@
=== vehicles/landing-craft/1945 ===
Name Capabilities (effective) # Notes Comments
-------- -------------- ------------- --- ------------------------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LCP(L) DP 2 CS 4 DP 2 CS 4 1† A†<sup>1</sup> B†<sup>3</sup> C†<sup>2</sup> D British: Unarmored &amp; unarmed; Inherent Crew | MA: 4&amp;4 | Front as Open-Topped AFV | Normal Range = 8 | No ramp, (un)load &#215;2 [EXC: Pier]
LCA DP 3 CS 6 DP 3 CS 6 2† n/a Personnel/SW only | Collateral Attacks: &#189; FP
LCVP DP 3 CS 5 DP 3 CS 5 3† B†<sup>2</sup> C†<sup>1</sup> Inherent Crew | MA: 4&amp;4 | Normal Range = 8
LCM(3) DP 5 CS 6 DP 5 CS 6 4† B†<sup>2</sup> C†<sup>1</sup> MA: 2&amp;2 or 6&amp;6 | Normal Range = 8
LCI(S) DP 14 CS 10 DP 14 CS 10 5† C†<sup>3</sup> D E†<sup>2</sup> F†<sup>1</sup> G AAMG: 2&amp;2 | -3 Target Size [{ *:One-level LOS obstacle across Side *:Units may not move through Location }] | Cloaked Passengers | No ramp, (un)load &#215;2 [EXC: Pier] | MA: 2&#215; AA [{ *:IFE Normal Range = 16 *:VCA and/or adjacent/same-hex &#8804; level NA }] | Stun: dr &#8805; 5 | Unbeaching: -1 DRM
LCT(4) DP 10 CS 9 DP 10 CS 9 6† C†<sup>3</sup> E†<sup>2</sup> F†<sup>1</sup> G -4 Target Size [{ *:One-level LOS obstacle across Side *:Units may not move through Location }] | Infantry Stack unload | MA: 2&#215; AA [{ *:IFE Normal Range = 16 *:VCA and/or adjacent/same-hex &#8804; level NA }] | Stun: dr &#8805; 5 | Unbeaching: -1 DRM
Daihatsu DP 3 CS 4 DP 3 CS 4 7† A†<sup>1</sup> AAMG: Rear/port-side only | Front as Open-Topped AFV
Shohatsu DP 2 CS 3 DP 2 CS 3 8† A† D Passengers: BU NA | Front as Open-Topped AFV | No ramp, (un)load &#215;2 [EXC: Pier]

@ -58,7 +58,7 @@ def test_vo_reports( webapp, webdriver ): #pylint: disable=too-many-locals
# check each vehicle/ordnance report
nationalities = list( get_nationalities( webapp ).keys() )
nationalities.extend( [ "allied-minor-common", "axis-minor-common" ] )
nationalities.extend( [ "allied-minor-common", "axis-minor-common", "landing-craft" ] )
failed = False
for nat in nationalities:
@ -73,6 +73,8 @@ def test_vo_reports( webapp, webdriver ): #pylint: disable=too-many-locals
for year in range(years[0],years[1]+1):
# get the next report
if nat == "landing-craft" and vo_type == "ordnance":
continue
results = get_vo_report( webapp, webdriver, vo_type, nat, "ETO", year, 1 )
if nat in ("burmese","filipino") or (nat,vo_type) in [("anzac","ordnance"),("kfw-cpva","vehicles")]:
assert not results
@ -119,35 +121,6 @@ def test_vo_reports( webapp, webdriver ): #pylint: disable=too-many-locals
assert not failed
# get the landing craft report
url = webapp.url_for( "get_lc_report" )
webdriver.get( url )
wait_for( 2, lambda: find_child("#results").is_displayed() )
results = _parse_report( webdriver.page_source )
# convert the report to plain-text
assert results[0][-2] == "Notes"
results[0].insert( len(results[0])-2, "#" )
assert results[0][-4] == "Capabilities"
results[0].insert( len(results[0])-3, "(effective)" )
buf = io.StringIO()
print( "=== landing craft ===", file=buf )
print( "", file=buf )
print(
tabulate.tabulate( results, headers="firstrow" ),
file = buf
)
report = buf.getvalue()
# check if we should save the report
if save_dir:
with open( os.path.join(save_dir,"landing-craft.txt"), "w" ) as fp:
fp.write( report )
# check the report
fname = os.path.join( check_dir, "landing-craft.txt" )
assert open(fname,"r",encoding="utf-8").read() == report
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def get_vo_report( webapp, webdriver,

@ -174,7 +174,7 @@ def _do_load_vo_listings( vasl_mod, vo_type, merge_common, real_data_dir, msg_st
# ---------------------------------------------------------------------
@app.route( "/<vo_type>/<nat>/<theater>/<int:year>", defaults={"month":1} )
@app.route( "/<vo_type>/<nat>/<theater>/<int:year>", defaults={"month":1} )
@app.route( "/<vo_type>/<nat>/<theater>/<int:year>/<int:month>" )
def get_vo_report( vo_type, nat, theater, year, month ):
"""Get a vehicle/ordnance report."""
@ -190,12 +190,3 @@ def get_vo_report( vo_type, nat, theater, year, month ):
YEAR = year,
MONTH = month,
)
@app.route( "/landing_craft" )
def get_lc_report():
"""Get a landing craft ordnance report."""
return render_template( "vo-report.html",
VO_TYPE = "landing-craft",
YEAR = "null",
MONTH = "null",
)

Loading…
Cancel
Save