kopia lustrzana https://github.com/bugout-dev/dao
TerminusTestCase now also deploys Moonstream token
rodzic
aeb80d7857
commit
44aa774e5c
|
@ -9,7 +9,7 @@ from . import TerminusFacet
|
|||
from . import TerminusInitializer
|
||||
|
||||
|
||||
class MoonstreamDAOTestCase(unittest.TestCase):
|
||||
class MoonstreamDAOSingleContractTestCase(unittest.TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls) -> None:
|
||||
try:
|
||||
|
@ -19,7 +19,7 @@ class MoonstreamDAOTestCase(unittest.TestCase):
|
|||
cls.contracts = gogogo(accounts[0], {"from": accounts[0]})
|
||||
|
||||
|
||||
class MoonstreamTokenTestCase(MoonstreamDAOTestCase):
|
||||
class MoonstreamTokenTestCase(MoonstreamDAOSingleContractTestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls) -> None:
|
||||
super().setUpClass()
|
||||
|
@ -45,11 +45,13 @@ class MoonstreamTokenTestCase(MoonstreamDAOTestCase):
|
|||
cls.erc20_facet = erc20_facet.address
|
||||
|
||||
|
||||
class TerminusTestCase(MoonstreamDAOTestCase):
|
||||
class TerminusTestCase(MoonstreamDAOSingleContractTestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls) -> None:
|
||||
super().setUpClass()
|
||||
|
||||
cls.terminus_contracts = gogogo(accounts[0], {"from": accounts[0]})
|
||||
|
||||
# Deploy Terminus
|
||||
initializer = TerminusInitializer.TerminusInitializer(None)
|
||||
initializer.deploy({"from": accounts[0]})
|
||||
|
@ -57,7 +59,7 @@ class TerminusTestCase(MoonstreamDAOTestCase):
|
|||
terminus_facet = TerminusFacet.TerminusFacet(None)
|
||||
terminus_facet.deploy({"from": accounts[0]})
|
||||
|
||||
diamond_address = cls.contracts["Diamond"]
|
||||
diamond_address = cls.terminus_contracts["Diamond"]
|
||||
facet_cut(
|
||||
diamond_address,
|
||||
"TerminusFacet",
|
||||
|
@ -71,7 +73,7 @@ class TerminusTestCase(MoonstreamDAOTestCase):
|
|||
cls.terminus_facet = terminus_facet.address
|
||||
|
||||
|
||||
class TestCoreDeployment(MoonstreamDAOTestCase):
|
||||
class TestCoreDeployment(MoonstreamDAOSingleContractTestCase):
|
||||
def test_gogogo(self):
|
||||
self.assertIn("DiamondCutFacet", self.contracts)
|
||||
self.assertIn("Diamond", self.contracts)
|
||||
|
|
|
@ -5,10 +5,10 @@ import brownie
|
|||
|
||||
from . import ERC20Facet, ERC20Initializer
|
||||
from .core import ZERO_ADDRESS, facet_cut
|
||||
from .test_core import MoonstreamDAOTestCase, MoonstreamTokenTestCase
|
||||
from .test_core import MoonstreamDAOSingleContractTestCase, MoonstreamTokenTestCase
|
||||
|
||||
|
||||
class TestDeployment(MoonstreamDAOTestCase):
|
||||
class TestDeployment(MoonstreamDAOSingleContractTestCase):
|
||||
def test_add_and_replace(self):
|
||||
initializer = ERC20Initializer.ERC20Initializer(None)
|
||||
initializer.deploy({"from": accounts[0]})
|
||||
|
@ -72,7 +72,7 @@ class TestDeployment(MoonstreamDAOTestCase):
|
|||
self.assertEqual(symbol, expected_symbol)
|
||||
|
||||
|
||||
class TestRemoveFacet(MoonstreamDAOTestCase):
|
||||
class TestRemoveFacet(MoonstreamDAOSingleContractTestCase):
|
||||
def test_remove_facet(self):
|
||||
initializer = ERC20Initializer.ERC20Initializer(None)
|
||||
initializer.deploy({"from": accounts[0]})
|
||||
|
|
|
@ -4,10 +4,10 @@ from brownie import accounts
|
|||
|
||||
from . import TerminusFacet, TerminusInitializer
|
||||
from .core import facet_cut
|
||||
from .test_core import MoonstreamDAOTestCase, TerminusTestCase
|
||||
from .test_core import MoonstreamDAOSingleContractTestCase, TerminusTestCase
|
||||
|
||||
|
||||
class TestDeployment(MoonstreamDAOTestCase):
|
||||
class TestDeployment(MoonstreamDAOSingleContractTestCase):
|
||||
def test_add_and_replace(self):
|
||||
initializer = TerminusInitializer.TerminusInitializer(None)
|
||||
initializer.deploy({"from": accounts[0]})
|
||||
|
@ -33,7 +33,7 @@ class TestDeployment(MoonstreamDAOTestCase):
|
|||
|
||||
class TestPoolCreation(TerminusTestCase):
|
||||
def test_create_pool(self):
|
||||
diamond_address = self.contracts["Diamond"]
|
||||
diamond_address = self.terminus_contracts["Diamond"]
|
||||
diamond_terminus = TerminusFacet.TerminusFacet(diamond_address)
|
||||
|
||||
initial_total_pools = diamond_terminus.total_pools()
|
||||
|
|
Ładowanie…
Reference in New Issue