Commit 520e433b authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[backend][asset] Remove declaration_path from AssetType

It is now provided by Asset
parent 3cf15346
......@@ -24,7 +24,6 @@
###############################################################################
import importlib
import os
import beat.core
......@@ -155,16 +154,6 @@ class AssetType(Enum):
success = common.delete_local(prefix, self.name.lower(), [name])
return success == 0
def declaration_path(self, prefix, name):
"""Returns the full path to the declaration file
:param prefix str: Path to the prefix
:param name str: name of the asset to delete
"""
asset_folder = os.path.join(prefix, self.path)
return os.path.join(asset_folder, "{}.json".format(name))
def has_code(self):
"""Returns whether this asset type contains code"""
......
......@@ -143,11 +143,6 @@ class TestAssetType:
result = asset_type.delete(tmp_prefix, asset_name)
assert result
def test_declaration_path(self, test_prefix, asset_type):
asset_name = self.existing_asset_name_map[asset_type]
declaration_path = asset_type.declaration_path(test_prefix, asset_name)
assert os.path.exists(declaration_path)
class TestAsset:
"""Test that the asset works correctly"""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment