templates.test_import

 1import smartpy as sp
 2
 3from smartpy.templates import fa1_2, welcome, test_imported
 4
 5
 6@sp.add_test()
 7def test():
 8    scenario = sp.test_scenario("ImportWelcome", [welcome.main, test_imported.m2])
 9    scenario.h1("Welcome")
10    c1 = welcome.main.MyContract(1, 1)
11    scenario += c1
12    scenario.add_module(fa1_2.m)
13    c2 = fa1_2.m.Fa1_2TestFull(
14        administrator=sp.test_account("Administrator").address,
15        metadata=sp.big_map(),
16        token_metadata={},
17        ledger={},
18    )
19    scenario += c2
20    scenario += test_imported.m2.MyContract()
21    assert "main" in __name__