o
    e                     @   sH   d dl Z d dlZd dlmZmZ G dd de jZG dd de jZdS )    N)check_image_pathcheck_image_urlc                   @   s   e Zd Zdd Zdd ZdS )TestCheckImagePathc                 C      |  td d S )Nztests/images/rabbit.JPG)
assertTruer   self r	   J/var/www/myenv/lib/python3.10/site-packages/tests/util/test_image_utils.pytest_valid_path	      z"TestCheckImagePath.test_valid_pathc                 C   r   )Nztests/images/notfound.jpg)assertFalser   r   r	   r	   r
   test_invalid_paths   r   z%TestCheckImagePath.test_invalid_pathsN)__name__
__module____qualname__r   r   r	   r	   r	   r
   r      s    r   c                   @   s*   e Zd Zejdd Zdd Zdd ZdS )TestCheckImageURLc                 C   s$   d}t t j| | t| d S )Nzhttps://example.com/found.png)	responsesaddHEADr   r   r   urlr	   r	   r
   test_valid_url   s   z TestCheckImageURL.test_valid_urlc                 C   s$   g d}|D ]	}|  t| qd S )N)zftp://example.com/found.pngz
/found.pngN)r   r   )r   pathspathr	   r	   r
   test_invalid_url   s   z"TestCheckImageURL.test_invalid_urlc                 C   s(   d}t jt j|dd | t| d S )Nz https://example.com/notfound.pngi  )status)r   r   r   r   r   r   r	   r	   r
   test_url_not_found    s   z$TestCheckImageURL.test_url_not_foundN)r   r   r   r   activater   r   r   r	   r	   r	   r
   r      s
    
	r   )unittestr   roboflow.util.image_utilsr   r   TestCaser   r   r	   r	   r	   r
   <module>   s
    