def test_itemBalances(self):
		lootsafe = LootSafe(self.apiUrl, self.apiKey)
		result = lootsafe.balance.balanceOf(self.account)

		self.assertEqual(result['status'], 200)
		self.assertIsNotNone(result['data'])
		self.assertTrue(result['data'].isdigit())
Esempio n. 2
0
    def test_addItem(self):
        lootsafe = LootSafe(self.apiUrl, self.apiKey)
        result = lootsafe.lootbox.addItem(self.apiKey, self.otpKey,
                                          self.itemAddress, self.rarity)

        self.assertEqual(result['status'], 200)
        self.assertTrue(type(result['data']) == dict)
Esempio n. 3
0
    def test_updateLootBoxCost(self):
        lootsafe = LootSafe(self.apiUrl, self.apiKey)
        result = lootsafe.lootbox.updateLootBoxCost(self.apiKey, self.otpKey,
                                                    "1")

        self.assertEqual(result['status'], 200)
        self.assertTrue(type(result['data']) == dict)
Esempio n. 4
0
    def test_getRecipe(self):
        lootsafe = LootSafe(self.apiUrl, self.apiKey)
        result = lootsafe.crafter.getRecipe(self.itemAddress)

        self.assertEqual(result['status'], 200)
        self.assertTrue(type(result['data']) == list)
        self.assertIsNotNone(result['data'])
Esempio n. 5
0
    def test_getDeconstructables(self):
        lootsafe = LootSafe(self.apiUrl, self.apiKey)
        result = lootsafe.crafter.getDeconstructables()

        self.assertEqual(result['status'], 200)
        self.assertTrue(type(result['data']) == list)
        self.assertIsNotNone(result['data'])
Esempio n. 6
0
    def test_newDestructionRecipe(self):
        lootsafe = LootSafe(self.apiUrl, self.apiKey)
        result = lootsafe.crafter.newDestructionRecipe(self.apiKey,
                                                       self.otpKey, '123456',
                                                       ["1212", "3434"],
                                                       [1, 2])

        self.assertEqual(result['status'], 200)
Esempio n. 7
0
# Import the library

from lootsafe import LootSafe

# Required Configurable Variables

apiUrl = "http://localhost:1337/v1/"
apiKey = "pWpzWuxoKUKAmlHc0wPi7lFS38FTth"

# Creating and Initialzing the LootSafe Object

lootsafe = LootSafe(apiUrl, apiKey)

# Example of basic usage

print()
print("=== Example ===\n")
print(lootsafe.crafter.getCraftables())
    def test_fetchEvents(self):
        lootsafe = LootSafe(self.apiUrl, self.apiKey)
        result = lootsafe.events.fetchEvents()

        self.assertEqual(result['status'], 200)
        self.assertTrue(type(result['data']) == list)
Esempio n. 9
0
    def test_getItems(self):
        lootsafe = LootSafe(self.apiUrl, self.apiKey)
        result = lootsafe.lootbox.getItems(self.rarity)

        self.assertEqual(result['status'], 200)
        self.assertTrue(type(result['data']) == list)
Esempio n. 10
0
    def test_getCost(self):
        lootsafe = LootSafe(self.apiUrl, self.apiKey)
        result = lootsafe.lootbox.getCost()

        self.assertEqual(result['status'], 200)
        self.assertTrue(result['data'].isdigit())
Esempio n. 11
0
    def test_removeRecipe(self):
        lootsafe = LootSafe(self.apiUrl, self.apiKey)
        result = lootsafe.crafter.removeRecipe(self.apiKey, self.otpKey,
                                               self.itemAddress)

        self.assertEqual(result['status'], 200)
Esempio n. 12
0
	def test_newItem(self):
		lootsafe = LootSafe(self.apiUrl, self.apiKey)
		result = lootsafe.general.newItem(self.apiKey, self.otpKey, "FNX45", "fnx45", 120000, "metadata")

		self.assertEqual(result['status'], 200)
Esempio n. 13
0
	def test_getTokenAddress(self):
		lootsafe = LootSafe(self.apiUrl, self.apiKey)
		result = lootsafe.general.getTokenAddress()

		self.assertEqual(result['status'], 200)
		self.assertTrue(type(result['address']) == str)
Esempio n. 14
0
	def test_fetchEvents(self):
		lootsafe = LootSafe(self.apiUrl, self.apiKey)
		result = lootsafe.general.getMeta()

		self.assertEqual(result['connected'], True)