U ×?½`´ã@s2dZddlZddlmmZdd„Zdd„ZdS)z< Tests cookiecutter baking process and rendered content éNc!Csô$|jdddœd}|j}d}||k}|st d|fd||f¡dt ¡ksRt |¡r\t |¡ndt |¡t |¡d œ}d d |i}tt  |¡ƒ‚d}}}|j }d}||k}|st d |fd ||f¡dt ¡ksÞt |¡rèt |¡ndt |¡t |¡d œ}d d |i}tt  |¡ƒ‚d}}}|j }|j }d}||k}|sºt d|fd||f¡dt ¡kstt |¡r~t |¡ndt |¡t |¡t |¡dœ}dd|i} tt  | ¡ƒ‚d}}}}|j }|j }|ƒ}|s8ddt ¡ksþt |¡rt |¡ndt |¡t |¡t |¡dœ} tt  | ¡ƒ‚d}}}|j }|j}d}||ƒ} | j} | ƒ} | sÜddt ¡ksŠt |¡r”t |¡ndt |¡t |¡t |¡t | ¡t | ¡t | ¡dœ}tt  |¡ƒ‚d}}}} } } |j }|j}d}||ƒ} | j} | ƒ} | sŒddt ¡ks:t |¡rDt |¡ndt |¡t |¡t |¡t | ¡t | ¡t | ¡dœ}tt  |¡ƒ‚d}}}} } } |j }|j}d}||ƒ} | j } | ƒ} | s} d#}||| | | |ƒ}|j }|ƒ}|sôd$dt ¡ks‚t |¡rŒt |¡ndt |¡t |¡t |¡t | ¡t | ¡t | ¡t |¡t |¡t |¡t |¡d%œ }tt  |¡ƒ‚d}}}} } } }}}}|j }|j}d}d} d} d>} d#}d&}||| | | ||ƒ}|j }|ƒ}|súd'dt ¡ks€t |¡rŠt |¡ndt |¡t |¡t |¡t | ¡t | ¡t | ¡t |¡t |¡t |¡t |¡t |¡d(œ }tt  |¡ƒ‚d}}}} } } }}}}}|j }|j}d}d} d} d>} d#}d&}d)}||| | | |||ƒ}|j }|ƒ}|sd*dt ¡kst |¡ršt |¡ndt |¡t |¡t |¡t | ¡t | ¡t | ¡t |¡t |¡t |¡t |¡t |¡t |¡d+œ }tt  |¡ƒ‚d}}}} } } }}}}}}|j }|j}d}d} d} d>} d#}d&}d)}d}||| | | ||||ƒ}|j }|ƒ}|s} d#}d&}d)}d}d?}||| | | |||||ƒ }|j}|ƒ}|sxd/dt ¡ksæt |¡rðt |¡ndt |¡t |¡t |¡t | ¡t | ¡t | ¡t |¡t |¡t |¡t |¡t |¡t |¡t |¡t |¡d0œ}tt  |¡ƒ‚d}}}} } } }}}}}}}}|j }|j}d}d} d} d>} d#}d&}d)}d}d@}||| | | |||||ƒ }|j}|ƒ}|s¸d/dt ¡ks&t |¡r0t |¡ndt |¡t |¡t |¡t | ¡t | ¡t | ¡t |¡t |¡t |¡t |¡t |¡t |¡t |¡t |¡d0œ}tt  |¡ƒ‚d}}}} } } }}}}}}}}|j }|j}d}d} d} d>} d#}d&}d)}d}dA}||| | | |||||ƒ }|j}|ƒ}| sød/dt ¡k sft |¡ rpt |¡ndt |¡t |¡t |¡t | ¡t | ¡t | ¡t |¡t |¡t |¡t |¡t |¡t |¡t |¡t |¡d0œ}tt  |¡ƒ‚d}}}} } } }}}}}}}}|j }|j}d}d} d} d>} d#}d&}d)}d}dB}||| | | |||||ƒ }|j}|ƒ}|"s8d/dt ¡k!s¦t |¡!r°t |¡ndt |¡t |¡t |¡t | ¡t | ¡t | ¡t |¡t |¡t |¡t |¡t |¡t |¡t |¡t |¡d0œ}tt  |¡ƒ‚d}}}} } } }}}}}}}}|j }|j}d}d} d} d>} d#}d&}d)}d}dC}||| | | |||||ƒ }|j}|ƒ}|#sxd/dt ¡k"sæt |¡"rðt |¡ndt |¡t |¡t |¡t | ¡t | ¡t | ¡t |¡t |¡t |¡t |¡t |¡t |¡t |¡t |¡d0œ}tt  |¡ƒ‚d}}}} } } }}}}}}}}|j }|j}d}d} d} d>} d#}d&}d)}d}dD}||| | | |||||ƒ }|j}|ƒ}|$s¸d/dt ¡k$s&t |¡$r0t |¡ndt |¡t |¡t |¡t | ¡t | ¡t | ¡t |¡t |¡t |¡t |¡t |¡t |¡t |¡t |¡d0œ}tt  |¡ƒ‚d}}}} } } }}}}}}}}dS)ENzproduct-crud-microserviceÚproduct©Ú project_nameZ object_model©Ú extra_contextr)ú==)z1%(py2)s {%(py2)s = %(py0)s.exit_code } == %(py5)sÚresult)Úpy0Úpy2Úpy5zassert %(py7)sÚpy7)Úis)z1%(py2)s {%(py2)s = %(py0)s.exception } is %(py5)s)zM%(py4)s {%(py4)s = %(py2)s {%(py2)s = %(py0)s.project }.basename } == %(py7)s)r r Úpy4r zassert %(py9)sÚpy9z]assert %(py6)s {%(py6)s = %(py4)s {%(py4)s = %(py2)s {%(py2)s = %(py0)s.project }.isdir }() })r r rÚpy6z template.yamlzšassert %(py12)s {%(py12)s = %(py10)s {%(py10)s = %(py8)s {%(py8)s = %(py4)s {%(py4)s = %(py2)s {%(py2)s = %(py0)s.project }.join }(%(py6)s) }.isfile }() })r r rrÚpy8Úpy10Úpy12z README.mdÚ functionsz™assert %(py12)s {%(py12)s = %(py10)s {%(py10)s = %(py8)s {%(py8)s = %(py4)s {%(py4)s = %(py2)s {%(py2)s = %(py0)s.project }.join }(%(py6)s) }.isdir }() }ZProductFunctionsz¤assert %(py14)s {%(py14)s = %(py12)s {%(py12)s = %(py10)s {%(py10)s = %(py4)s {%(py4)s = %(py2)s {%(py2)s = %(py0)s.project }.join }(%(py6)s, %(py8)s) }.isdir }() })r r rrrrrÚpy14Úsrcz®assert %(py16)s {%(py16)s = %(py14)s {%(py14)s = %(py12)s {%(py12)s = %(py4)s {%(py4)s = %(py2)s {%(py2)s = %(py0)s.project }.join }(%(py6)s, %(py8)s, %(py10)s) }.isdir }() }) r r rrrrrrÚpy16Úmainz¸assert %(py18)s {%(py18)s = %(py16)s {%(py16)s = %(py14)s {%(py14)s = %(py4)s {%(py4)s = %(py2)s {%(py2)s = %(py0)s.project }.join }(%(py6)s, %(py8)s, %(py10)s, %(py12)s) }.isdir }() }) r r rrrrrrrÚpy18ÚjavazÂassert %(py20)s {%(py20)s = %(py18)s {%(py18)s = %(py16)s {%(py16)s = %(py4)s {%(py4)s = %(py2)s {%(py2)s = %(py0)s.project }.join }(%(py6)s, %(py8)s, %(py10)s, %(py12)s, %(py14)s) }.isdir }() }) r r rrrrrrrrÚpy20ÚcomzÌassert %(py22)s {%(py22)s = %(py20)s {%(py20)s = %(py18)s {%(py18)s = %(py4)s {%(py4)s = %(py2)s {%(py2)s = %(py0)s.project }.join }(%(py6)s, %(py8)s, %(py10)s, %(py12)s, %(py14)s, %(py16)s) }.isdir }() }) r r rrrrrrrrrÚpy22ÚjvdlzÖassert %(py24)s {%(py24)s = %(py22)s {%(py22)s = %(py20)s {%(py20)s = %(py4)s {%(py4)s = %(py2)s {%(py2)s = %(py0)s.project }.join }(%(py6)s, %(py8)s, %(py10)s, %(py12)s, %(py14)s, %(py16)s, %(py18)s) }.isdir }() }) r r rrrrrrrrrrÚpy24zàassert %(py26)s {%(py26)s = %(py24)s {%(py24)s = %(py22)s {%(py22)s = %(py4)s {%(py4)s = %(py2)s {%(py2)s = %(py0)s.project }.join }(%(py6)s, %(py8)s, %(py10)s, %(py12)s, %(py14)s, %(py16)s, %(py18)s, %(py20)s) }.isdir }() })r r rrrrrrrrrrrÚpy26zCreateProductFunction.javazëassert %(py28)s {%(py28)s = %(py26)s {%(py26)s = %(py24)s {%(py24)s = %(py4)s {%(py4)s = %(py2)s {%(py2)s = %(py0)s.project }.join }(%(py6)s, %(py8)s, %(py10)s, %(py12)s, %(py14)s, %(py16)s, %(py18)s, %(py20)s, %(py22)s) }.isfile }() })r r rrrrrrrrrrrr Úpy28zDeleteProductFunction.javazReadProductFunction.javazUpdateProductFunction.javazListProductsFunction.javaÚ dataaccesszêassert %(py28)s {%(py28)s = %(py26)s {%(py26)s = %(py24)s {%(py24)s = %(py4)s {%(py4)s = %(py2)s {%(py2)s = %(py0)s.project }.join }(%(py6)s, %(py8)s, %(py10)s, %(py12)s, %(py14)s, %(py16)s, %(py18)s, %(py20)s, %(py22)s) }.isdir }() }zDataAccess.javazõassert %(py30)s {%(py30)s = %(py28)s {%(py28)s = %(py26)s {%(py26)s = %(py4)s {%(py4)s = %(py2)s {%(py2)s = %(py0)s.project }.join }(%(py6)s, %(py8)s, %(py10)s, %(py12)s, %(py14)s, %(py16)s, %(py18)s, %(py20)s, %(py22)s, %(py24)s) }.isfile }() })r r rrrrrrrrrrrr r!Úpy30zPaginatedList.javazProductDynamoDataAccess.javaÚmodelz Product.javaÚtestzCreateProductFunctionTest.javazDeleteProductFunctionTest.javazReadProductFunctionTest.javazUpdateProductFunctionTest.javazListProductFunctionTest.javazProductFunctionsTests.java)ÚbakeÚ exit_codeÚ @pytest_arÚ_call_reprcompareÚ @py_builtinsÚlocalsÚ_should_repr_global_nameÚ _safereprÚAssertionErrorÚ_format_explanationÚ exceptionÚprojectÚbasenameÚisdirÚjoinÚisfile)!ÚcookiesrÚ @py_assert1Ú @py_assert4Ú @py_assert3Ú @py_format6Ú @py_format8Ú @py_assert6Ú @py_assert5Ú @py_format10Ú @py_format7Ú @py_assert7Ú @py_assert9Ú @py_assert11Ú @py_format13Ú @py_assert13Ú @py_format15Ú @py_assert15Ú @py_format17Ú @py_assert17Ú @py_format19Ú @py_assert19Ú @py_format21Ú @py_assert21Ú @py_format23Z @py_assert23Ú @py_format25Z @py_assert25Z @py_format27Z @py_assert27Ú @py_format29Z @py_assert29Ú @py_format31©rQúz/Users/jvdl/Tech/java/java-crud-microservice/java11/cookiecutter-aws-sam-java-crud-microservice/tests/test_cookiecutter.pyÚtest_project_trees0þ N  N  Z H ``` h p x$€(ˆ,0˜4 8 8 8 8 8 8¨<¨<¨< 8¨<€(ˆ,0˜4 8 8 8 8 8 rSc CsÞ|jdddœd}|j ddddd d d dd d ¡ }| ¡}d |¡}d}|D]Ž}||k}|sÔt d|fd||f¡dt ¡ks„t |¡rŽt  |¡nddt ¡ks¦t |¡r°t  |¡nddœ}dd|i}t t  |¡ƒ‚d}qJdS)NZ my_lambdaÚuserrrrZ UserFunctionsrrrrrr"zUserDynamoDataAccess.javaÚ)z;DynamoDbClientBuilder ddbBuilder = DynamoDbClient.builder()z@DynamoDbEnhancedClient client = DynamoDbEnhancedClient.builder()zYDynamoDbTable userTable = client.table(DDB_TABLE, TableSchema.fromBean(User.class))zIresponse.items().stream().map(this::mapUser).collect(Collectors.toList()))Úin)z%(py0)s in %(py2)sÚcontentÚ app_content)r r zassert %(py4)sr) r&r1r4Ú readlinesr(r)r*r+r,r-r.r/) r6rZapp_filerXÚcontentsrWr7Ú @py_format3Ú @py_format5rQrQrRÚtest_app_content/sþ  ` r]) Ú__doc__Úbuiltinsr*Ú_pytest.assertion.rewriteÚ assertionÚrewriter(rSr]rQrQrQrRÚs*