If I put the CapacityMin
class and unittest class in same .py file, every things fine.
But after I move CapacityMin
class to a separa
You are using the module, not the class within the module.
I suspect that you are using it like this:
from Entities import CapacityMin
while you meant to use:
from Entities.CapacityMin import CapacityMin
This kind of confusion is one of the reasons that the Python styleguide (PEP 8) recommends using lowercase names for your modules; your import would then be:
from entities.capacitymin import CapacityMin
and your error would have been easier to spot.