Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

test_create_service.py 350 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
  1. import requests
  2. def test_service():
  3. prediction = requests.post(
  4. "http://127.0.0.1:3000/predict",
  5. headers={"content-type": "application/json"},
  6. data='{"City": "Pune", "PaymentTier": 0, "Age": 0, "Gender": "Female", "EverBenched": "No", "ExperienceInCurrentDomain": 0}',
  7. ).text
  8. assert prediction[0] in ["0", "1"]
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...