S-Dreamer commited on
Commit
9e148c4
·
verified ·
1 Parent(s): 210193d

Create tests/test_app.py

Browse files
Files changed (1) hide show
  1. tests/test_app.py +17 -0
tests/test_app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+ """
4
+ Basic tests for app functionality.
5
+ """
6
+
7
+ import os
8
+ from pipeline_utils import verify_token, initialize_pipeline
9
+
10
+ def test_verify_token_valid():
11
+ token = os.getenv("HUGGINGFACE_TOKEN")
12
+ assert verify_token(token) is True
13
+
14
+ def test_pipeline_initialization():
15
+ token = os.getenv("HUGGINGFACE_TOKEN")
16
+ pipeline = initialize_pipeline("distilbert-base-uncased-finetuned-sst-2-english", token)
17
+ assert pipeline is not None