As long as the pair is comfortable they will spawn anywhere, including IME the shipping bag, 10g QT tank, etc.
However the problem becomes one of water quality, as to get a pair in breeding shape takes a lot of food, you need a lot of filtration, which a small tank can not provide unless it is connected to a larger volume of water, or you take a lot of direct intervention (water changes).