Browse Source

Adjust tests to changed Screenshot and IBAN Logic

bernhardbuhl 3 years ago
parent
commit
274bbf14fb
2 changed files with 4 additions and 10 deletions
  1. 1 1
      tests/test_browserHandling.py
  2. 3 9
      tests/test_iban.py

+ 1 - 1
tests/test_browserHandling.py

@@ -136,7 +136,7 @@ def test_takeScreenshot_exception(getdriver):
     filename = getdriver.takeScreenshot()
     import os
     # the file name should not exist
-    assert not os.path.isfile(filename)
+    assert not filename
 
 
 def test_takeScreenshot_filecheck(getdriver):

+ 3 - 9
tests/test_iban.py

@@ -4,16 +4,10 @@ import pytest
 def test_getRandomIBAN():
     """ test RandomIBAN genrate and validate 
     """
-    # keep both IBAN class separate
     from baangt.base.IBAN import IBAN as b_IBAN
-    from schwifty import IBAN as o_IBAN
     
     # generate random IBAN
-    ran_iban = o_IBAN(b_IBAN().getRandomIBAN())
+    ran_iban = b_IBAN().getRandomIBAN()
 
-    assert ran_iban.country_code == "AT"
-    assert ran_iban.bank_code == "20151"
-    
-    
-    
-    
+    assert ran_iban
+    assert len(ran_iban) > 10