예제 #1
0
    def test_get_all_characters_after_deleting(self):
        print("\nget all characters. Actions:")
        print("\n1. del 3 characters if exists")
        print("\n2. get all characters, but check 3(not exist)")
        commands = APICommands()
        commands.del_some_characters("Vasya", 3)
        all_characters, status_code = commands.get_all_characters()
        assert str(status_code) == "200"
        all_characters = all_characters['result']
        i = 0
        for cur_character in all_characters:
            if cur_character["name"] == ("Vasya0" or "Vasya1" or "Vasya2"):
                i += 1

        assert i == 0
예제 #2
0
 def setup(self):
     print("\ntest case setup ")
     # del 1 character if exists
     commands = APICommands()
     commands.del_some_characters("Vasya", 1)
예제 #3
0
 def teardown(self):
     print("\ntest case teardown")
     # delete 1 character if exists after test case
     commands = APICommands()
     commands.del_some_characters("Vasya", 1)