From 2c9fe8a9eb1f35043c32b974aca62bcfd5b07558 Mon Sep 17 00:00:00 2001
From: Felix Tjahyadi <felix.tjahyadi@ui.ac.id>
Date: Wed, 13 Mar 2024 08:32:53 +0700
Subject: [PATCH] testmore#4

---
 stock_monitoring/tests/test_selenium.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/stock_monitoring/tests/test_selenium.py b/stock_monitoring/tests/test_selenium.py
index 5152ef56..cb947ebd 100644
--- a/stock_monitoring/tests/test_selenium.py
+++ b/stock_monitoring/tests/test_selenium.py
@@ -1,5 +1,5 @@
 from django.test import LiveServerTestCase
-from stock_monitoring.models import Barang, Pergerakan
+from stock_monitoring.models import Obat
 from selenium import webdriver
 from selenium.webdriver.chrome.options import Options
 from selenium.webdriver.common.keys import Keys
@@ -13,8 +13,8 @@ class SeleniumShowAllBarangTestCase(LiveServerTestCase):
         self.driver.implicitly_wait(10)  # Implicit wait to handle dynamic elements
 
         # Create some Barang objects for testing pagination
-        Barang.objects.create(barang_id="a", barang_nama='Product A', barang_qty=100, barang_expired='2024-06-30', barang_kondisi='New', barang_jenis='Type A', barang_unit='Unit A', barang_gambar='ristek.link/panadol')
-        Barang.objects.create(barang_id="b", barang_nama='Product B', barang_qty=50, barang_expired='2024-08-15', barang_kondisi='Used', barang_jenis='Type B', barang_unit='Unit B', barang_gambar='ristek.link/panadol')
+        Obat.objects.create(barang_id="a", barang_nama='Product A', barang_qty=100, barang_expired='2024-06-30', barang_kondisi='New', barang_jenis='Type A', barang_unit='Unit A', barang_gambar='ristek.link/panadol')
+        Obat.objects.create(barang_id="b", barang_nama='Product B', barang_qty=50, barang_expired='2024-08-15', barang_kondisi='Used', barang_jenis='Type B', barang_unit='Unit B', barang_gambar='ristek.link/panadol')
 
     def test_show_all_barang_pagination(self):
         # Open the browser and navigate to the live server
@@ -53,7 +53,7 @@ class SeleniumShowAllBarangTestCase(LiveServerTestCase):
 
     def test_show_all_barang_empty_object(self): # Positive Test
         # Delete all Barang objects to simulate an empty database
-        Barang.objects.all().delete()
+        Obat.objects.all().delete()
 
         # Make a request to the view
         self.driver.get(self.live_server_url + '/stock_monitoring/')
@@ -90,7 +90,7 @@ class SeleniumShowDetailBarangTestCase(LiveServerTestCase):
         self.driver.implicitly_wait(10)  # Implicit wait to handle dynamic elements
 
         # Create some Barang objects for testing
-        self.barang_1 = Barang.objects.create(
+        self.barang_1 = Obat.objects.create(
             barang_id="one",
             barang_nama='Barang 1',
             barang_qty=100,
@@ -101,7 +101,7 @@ class SeleniumShowDetailBarangTestCase(LiveServerTestCase):
             barang_gambar='ristek.link/obat_1'
         )
 
-        self.barang_2 = Barang.objects.create(
+        self.barang_2 = Obat.objects.create(
             barang_id="two",
             barang_nama='Barang 2',
             barang_qty=100,
-- 
GitLab