Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 

26 rindas
865 B

import pytest
from fe.access.new_seller import register_new_seller
import uuid
class TestCreateStore:
@pytest.fixture(autouse=True)
def pre_run_initialization(self):
self.user_id = "test_create_store_user_{}".format(str(uuid.uuid1()))
self.store_id = "test_create_store_store_{}".format(str(uuid.uuid1()))
self.password = self.user_id
yield
def test_ok(self):
self.seller = register_new_seller(self.user_id, self.password)
code = self.seller.create_store(self.store_id)
assert code == 200
def test_error_exist_store_id(self):
self.seller = register_new_seller(self.user_id, self.password)
code = self.seller.create_store(self.store_id)
assert code == 200
code = self.seller.create_store(self.store_id)
assert code != 200