mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-06 00:15:11 -04:00
Move choose_port tests into helpers tests, and delete the obsolete onionshare tests. (I really need to write more tests...)
This commit is contained in:
parent
22485f7933
commit
adc450c971
2 changed files with 9 additions and 17 deletions
|
@ -16,20 +16,3 @@ GNU General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
import socket
|
||||
from onionshare import OnionShare
|
||||
|
||||
|
||||
def test_choose_port_returns_a_port_number():
|
||||
"""choose_port() returns a port number"""
|
||||
app = OnionShare()
|
||||
app.choose_port()
|
||||
assert 1024 <= app.port <= 65535
|
||||
|
||||
|
||||
def test_choose_port_returns_an_open_port():
|
||||
"""choose_port() returns an open port"""
|
||||
app = OnionShare()
|
||||
# choose a new port
|
||||
app.choose_port()
|
||||
socket.socket().bind(("127.0.0.1", app.port))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue